Hey, I want to move a part randomly and after 5 secounds make it come back to it's place.I've thought at a way but idk if it will work.
function yeah(mouse)
x = Instance.new("Part", Workspace)
--x properties
x.Touched:connect(function(Part)
if Part.Parent:FindFirstChild("Humanoid") == nil then
y = Part.Position
Part.Position = Part.Position + Vector3.new(math.random(-3, 3), 0, math.random(-3, 3))
wait(5)
Part.Position = y
Thanks!

3 comments
You are missing the endings for your functions.
It's not that, I wrote that here not in studio.
You have the code, why not test it yourself? Or do you mean, that's all the code you have so far, and you don't know how to finish the script?