Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

unexpected symbol near '='?

Asked by 4 years ago

so, I am just working on my infinite obby. this is my code:

wait(1)
if not game.Workspace.setup.Value == 1 then
Print("[spheres] sphere created")
script.Parent.Position = Vector3.new(-55, 14, 15)
script.Parent.Position = script.Parent.Position + script.Parent.Position = Vector3.new(math.random(75),0,0)
script.parent.Transparency = 0
while true do

script.Parent.Position = script.Parent.Position + script.Parent.Position = Vector3.new(0,0,1)
if game.Workspace.reset.Value == 1 then
script.Parent:Destroy()
end
end
else
print("[spheres] sphere controller has started")
script.Parent.Transparency = 1
wait(6)
while true do
if game.Workspace.reset == 0 then
script.Parent:Clone()
wait(1.5)

end
end
end

and when I test it, my module that has the script in is vanishes. and in output, it says: 18:42:52.899 - Workspace.platforms.spheres.Part.Script:5: unexpected symbol near '=' it does not tell me where the error is, and I cant fix it. please help!

0
accept his answer Gameplayer365247v2 1055 — 4y

1 answer

Log in to vote
1
Answered by
Alphexus 498 Moderation Voter
4 years ago

Line 5 should be “script.Parent.Position = script.Parent.Position + Vector3.new(math.random(75), 0,0) | you added extra “”l BTW helpful tip! It tells you what line ur error is in: Workspace.platforms.spheres.Part.Script:5 . The 5 at the end is the line number.

0
I meant u added extra”=“. Sorry on mobile so it’s kind of hard! Alphexus 498 — 4y
0
thanks alphexus codingMASTER398 52 — 4y
0
Np can you please accept my answer if you may? Alphexus 498 — 4y
Ad

Answer this question