generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: tele death

Previous Thread :: Next Thread 
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
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
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
17 Aug 2014 07:03 PM
ive been trying at this all afternoon. help?
Report Abuse
reallycrazyBailey is not online. reallycrazyBailey
Joined: 29 Mar 2011
Total Posts: 28
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
reallycrazyBailey is not online. reallycrazyBailey
Joined: 29 Mar 2011
Total Posts: 28
17 Aug 2014 07:06 PM
Try*
Report Abuse
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
17 Aug 2014 07:07 PM
ddint work. it just made the teleport stop altogether. thanks anyways!
Report Abuse
reallycrazyBailey is not online. reallycrazyBailey
Joined: 29 Mar 2011
Total Posts: 28
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
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
17 Aug 2014 07:11 PM
didnt work

the error was this:

bad argument #1 to 'new' (Vector3 expected, got nil)
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
17 Aug 2014 07:12 PM
Character:MoveTo(stuff here)
Report Abuse
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
17 Aug 2014 07:13 PM
that makes him walk, i believe
Report Abuse
reallycrazyBailey is not online. reallycrazyBailey
Joined: 29 Mar 2011
Total Posts: 28
17 Aug 2014 07:13 PM
It depends how it's used. It has two different uses
Report Abuse
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
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
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
17 Aug 2014 07:23 PM
apparently MouseButton1Click is not a valid member of Workspace
Report Abuse
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
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
reallycrazyBailey is not online. reallycrazyBailey
Joined: 29 Mar 2011
Total Posts: 28
17 Aug 2014 07:29 PM
Try torso.Parent:MoveTo(Put Stuff Here)
Report Abuse
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
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
reallycrazyBailey is not online. reallycrazyBailey
Joined: 29 Mar 2011
Total Posts: 28
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
IMSOEPICLE is not online. IMSOEPICLE
Joined: 29 Jul 2011
Total Posts: 452
17 Aug 2014 07:39 PM
thanks! i actually learned alot from what you told me
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image