Hey guys my name is DVSRobert and I was wondering what was wrong with my script. Im trying to make a script where when a Part is touched it moves to a Diffrent position the code is saying that I need to close my function at line 5 even though Ive already ended it at line 5. What Did i do wrong?
local function DoDOMove()
script.Parent.Position = Workspace.DoDO.Position + Vector3.new(math.random)``
end
script.Parent.Touched:Connect(DoDOMove()
--BTW if you couldnt tell DoDO is a part

1 comment
Oh Alright thanks. Im kind of new to scripting so I wanted to expirement with some stuff. Im kinda dumb and didnt realize the function needs to be a parameter same with math.random