local platform = model.Anchor
local platform = model.start
local platform = model.fin
Here you assign three different values to a local platform. So the first two lines have no effect.
Then you index fin
and start
in
local distance = fin.Position - start.Position
Where fin
and start
have never been defined in local or global scope. Hence the error message.
You probably wanted to do something like this:
local start = model.start
local fin = model.fin
local distance = fin.Position - start.Position
0
solved Script Error says Unknown Global although the names are clearly correct