of     1   

smunkey
#141013918Monday, July 21, 2014 2:35 AM GMT

I have made this teleportation gui script, however it won't work. In the script it shows no errors. However when I press the button it tells me that 'torso' is not a valid part of 'localPlayer'. Why is this and what is the correct format for this? function onClicked() game.Players.localPlayer.torso.cFrame.new(20, 12, 85) script.Parent.Parent.Parent:Destroy() end script.Parent.MouseButton1Click:connect(onClicked)
C_Sharper
#141013995Monday, July 21, 2014 2:36 AM GMT

function onClicked() game.Players.LocalPlayer.Torso.CFrame = Vector3.new(20, 12, 85) script.Parent.Parent.Parent:Destroy() end script.Parent.MouseButton1Click:connect(onClicked)
smunkey
#141014156Monday, July 21, 2014 2:38 AM GMT

Thank you for the reply, however it outputs the same no such thing as players having a 'torso' in the output.
C_Sharper
#141014842Monday, July 21, 2014 2:45 AM GMT

function onClicked() game.Players.LocalPlayer.Character.Torso.CFrame = Vector3.new(20, 12, 85) script.Parent.Parent.Parent:Destroy() end script.Parent.MouseButton1Click:connect(onClicked)
excellentAnarchy
#141015185Monday, July 21, 2014 2:48 AM GMT

Get the character from the Player before accesing his torso, there's no such thing as "Torso" inside the Player.
smunkey
#141015835Monday, July 21, 2014 2:55 AM GMT

I have tried messing around with your script to get it to work but just made it worse. Before I messed with it, it gave off this in the output 22:51:44.559 - "Part.cFrame" should be "CFrame" in Players.Player1.PlayerGui.ScreenGui.Frame.ImageButton.Torso 22:51:44.562 - new is not a valid member 22:51:44.565 - Script 'Players.Player1.PlayerGui.ScreenGui.Frame.ImageButton.Torso', Line 2 22:51:44.569 - Stack End 22:51:44.571 - Disconnected event because of exception
excellentAnarchy
#141016196Monday, July 21, 2014 2:58 AM GMT

function onClicked() game.Players.localPlayer.torso.CFrame.new(20, 12, 85) script.Parent.Parent.Parent:Destroy() end script.Parent.MouseButton1Click:connect(onClicked) ¬¬¬¬¬¬¬¬¬ it tells you to fix what I have fixed above. But that will not work because Torso is not a child of Player.
smunkey
#141016961Monday, July 21, 2014 3:05 AM GMT

This is quite a problem, without the player containing anything that can be used to move him/her with cFrame; figuring this out will be difficult :o
excellentAnarchy
#141046108Monday, July 21, 2014 10:57 AM GMT

You need to get the Players Character first. Players.Playername.Character
C_Sharper
#141057564Monday, July 21, 2014 2:47 PM GMT

Are you using a LocalScript? function onClicked() game.Players.LocalPlayer.Character.Torso.CFrame = Vector3.new(20, 12, 85) script.Parent.Parent.Parent:Destroy() end script.Parent.MouseButton1Click:connect(onClicked) ..This should work
AggressiveCatch
#141057894Monday, July 21, 2014 2:52 PM GMT

function onClicked() game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(20, 12, 85) script.Parent.Parent.Parent:Destroy() end script.Parent.MouseButton1Click:connect(onClicked)
C_Sharper
#141058954Monday, July 21, 2014 3:08 PM GMT

Awesome, it is a vector3 value. CFrame = Vector3.new()
YungLimbo
#141059115Monday, July 21, 2014 3:11 PM GMT

function onClicked() local player = game.Players:GetPlayerFromCharacter player.Character:MoveTo(Vector3.new(20,12,85)) end This should work
AggressiveCatch
#141059260Monday, July 21, 2014 3:13 PM GMT

@Duke It won't. You haven't supplied the necessary argument for GetPlayerFromCharacter().
ByteInfinity
#141059736Monday, July 21, 2014 3:18 PM GMT

function onClicked() game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new (Vector3.new(20,12,85)) script.Parent.Parent.Parent:Destroy() -- idk what this is end script.Parebt.MouseButton1Click:connect(onClicked)
smunkey
#141191981Tuesday, July 22, 2014 8:06 PM GMT

Thanks bros. :D
Lua_Basics
#141192097Tuesday, July 22, 2014 8:07 PM GMT

try adding a click detector

    of     1