Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why doesn't my script for teleporting objects work (for my tycoon)?

I am making a tycoon right, and this is supposed to teleport a drop once it hits the pad ( which is what the script is under ) and teleport it to the area listed in the script? Can someone help me?

script.Parent.Touched:connect(function(hit)
	if hit.Parent:FindFirstChild("part") then
		hit.Parent.part.CFrame = CFrame.new(-189.706, 2.003, -183.431)
	else print("You're not a drop silly!")
end)

edit: its also giving me this error unexpected symbol near ')'

2 comments

0

Use vector3.New

0

it's still giving me this error unexpected symbol near ')'

1 answer

script.Parent.Touched:connect(function(h)
	if (h.Parent.Name == "part") then
		h.Parent:MoveTo(Vector3.new(-189.706, 2.003, -183.431))
	end
end) 

1 comment

0

Urm this isn't the correct anwser, he is making a tycoon. He has to use cframe, if he used just vector, everyone would go to the same position if they touched the part

This discussion is preserved as it was. New answers, comments, and votes are closed.