|
| 17 Aug 2014 06:56 PM |
so i just got this script to teleport the player. for some reason when it teleports the player, they die.. anyone got a solution?
button = script.Parent
function clicked() torso = button.Parent.Parent.Parent.Parent.Character.Torso Player = button.Parent.Parent.Parent.Parent color = Player.TeamColor if color == "Really blue" then destination = script.Parent.points.blue.Value elseif color == "Bright red" then destination = script.Parent.points.red.Value end torso.Position = Vector3.new(destination,torso.CFrame.lookVector) end
script.Parent.MouseButton1Click:connect(function(a) clicked() end)
|
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:03 PM |
| ive been trying at this all afternoon. help? |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:05 PM |
| Moving the Torso Position rips it out of the character. Trying .CFrame instead of .Position. That way the whole body moves with the Torso |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Aug 2014 07:07 PM |
| ddint work. it just made the teleport stop altogether. thanks anyways! |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:09 PM |
Maybe try replacing that one line with this: torso.CFrame = CFrame.new(destination,torso.CFrame.lookVector)
I haven't done a lot on ROBLOX recently so my knowledge may be a bit rusty |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:11 PM |
didnt work
the error was this:
bad argument #1 to 'new' (Vector3 expected, got nil) |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:12 PM |
| Character:MoveTo(stuff here) |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:13 PM |
| that makes him walk, i believe |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:13 PM |
| It depends how it's used. It has two different uses |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:21 PM |
doesnt work
button = script.Parent
function clicked() torso = button.Parent.Parent.Parent.Parent.Character.Torso Player = button.Parent.Parent.Parent.Parent color = Player.TeamColor if color == "Really blue" then torso:MoveTo(script.Parent.points.blue) elseif color == "Bright red" then torso:MoveTo(script.Parent.points.red) end end
script.Parent.MouseButton1Click:connect(function(a) clicked() end)
|
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:23 PM |
| apparently MouseButton1Click is not a valid member of Workspace |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:24 PM |
oops here is better, although it still dont work
button = script.Parent
function clicked() torso = button.Parent.Parent.Parent.Parent.Character.Torso Player = button.Parent.Parent.Parent.Parent color = Player.TeamColor if color == "Really blue" then torso:MoveTo(Vector3.new(104, 7.49, 239)) elseif color == "Bright red" then torso:MoveTo(Vector3.new(91, 7.49, 239)) end end
script.Parent.MouseButton1Click:connect(function(a) clicked() end)
|
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:29 PM |
| Try torso.Parent:MoveTo(Put Stuff Here) |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:33 PM |
this is crazy. button = script.Parent
function clicked() torso = button.Parent.Parent.Parent.Parent.Character.Torso Player = button.Parent.Parent.Parent.Parent color = Player.TeamColor if color == "Really blue" then torso.Parent:MoveTo(Vector3.new(104, 7.49, 239)) elseif color == "Bright red" then torso.Parent:MoveTo(Vector3.new(91, 7.49, 239)) end end
script.Parent.MouseButton1Click:connect(function(a) clicked() end)
still dont work! |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:36 PM |
| Well, I'm too busy to thoroughly look through this script, but just a tip, using a local script can let you type localPlayer to refer to the player instead of typing .Parent so many times |
|
|
| Report Abuse |
|
|
|
| 17 Aug 2014 07:39 PM |
| thanks! i actually learned alot from what you told me |
|
|
| Report Abuse |
|
|