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

Why am i not getting not getting teleported when i click the button? [SOLVED]

Im trying to teleport the player when they click the button but it's not working any help?

code:

script.Parent.MouseButton1Click:Connect(function()

game.Players.LocalPlayer.Character.LowerTorso.CFrame = CFrame.new(workspace.Part.Position)

end)

1 comment

0

if u have multiple parts in workspace called part then it cant teleport you because there are multiple positions that it wants to teleport you to, make the part name something special

2 answers

✓ Accepted answer

I am certain that your script works:

script.Parent.MouseButton1Click:Connect(function() 

game.Players.LocalPlayer.Character.LowerTorso.CFrame = CFrame.new(workspace.Part.Position)

end)

Please check if you are using a LocalScript which is under the textbutton since specified in the first line which isscript.Parent.MouseButton1Click:Connect(function() And also check if your Using R15 specified in the 3rd line game.Players.LocalPlayer.Character.LowerTorso.CFrame whilst R15 having LowerTorso(s). And lastly, make sure your Part exists in the workspace!

Try to rename your part to a specify name.

script.Parent.MouseButton1Click:Connect(function()
game.Players.LocalPlayer.Character.LowerTorso.CFrame =
CFrame.new(game.Workspace.name.Position)
end)

I think that should work for you. Also, don`t forget to change line 3 name to a name with which you renamed your part.

2 comments

0

mariofl2003 CFrame is not a valid member of model..??

0

this thread is marked as 'answered', and I see no accepted answer. Did you already found a way to fix it?

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