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

scree gui teleport script?

button = script.Parent
teleport = game.Workspace.teleport


function removeGUI()
	wait(1)
	script.Parent.Parent.Vi
sible = false
	wait()
	gun = game.Lighting.LinkedPaintballGun:Clone()
	gun.Parent = button.Parent.Parent.Parent.Parent.Backpack
	:MoveTo(teleport) -- i need help on this line, how do i get the player to teleport to this brick
	
	
end

button.MouseButton1Click:connect(removeGUI)

also when i was using the command line, it said "Unable to cast Instance to Vector3" does this mean i cant use a part to teleport my character to?

1 comment

0

Try removing the line breaks on lines 7 and 11 and tell what happens.

1 answer

Error at line 12, the script doesn't know where to move what to workspace.teleport, add on to the line game.Players.LocalPlayer.Character:MoveTo(teleport) 'Sorry if this didn't work'. I hope this helped!

2 comments

0

would this only work in local script cause im using a regular script

0

I think it would work in a Regular script too, I do hope it works if so.

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