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: Teleport on Death

Previous Thread :: Next Thread 
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 07:35 PM
Okay, so lets say a player is on a brick. They are killed or they reset ethier in the air or on that brick. How would I get it where once they die on that brick they are just teleported back onto that brick until they get off it?
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 07:44 PM
Bump..
Report Abuse
Confaro is not online. Confaro
Joined: 10 Jun 2014
Total Posts: 17
12 Jul 2014 07:46 PM
k
~i have six toes
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 07:51 PM
...
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 07:56 PM
bump
Report Abuse
Landish is not online. Landish
Joined: 24 Sep 2011
Total Posts: 8152
12 Jul 2014 07:58 PM
k
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:00 PM
omfg
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
12 Jul 2014 08:07 PM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c.Humanoid.Died:connect(function()
c:MoveTo(0,0,0)
end)
end)
end)
~Tynexx
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:15 PM
Doesn't worked. I even changed the c:0,0,0 to the coords of the part.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:20 PM
It's been an hour and I still haven't got much help.
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
12 Jul 2014 08:25 PM
Not for requests.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:26 PM
I just want to know how to do it..
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:32 PM
Thanks for no help...
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
12 Jul 2014 08:33 PM
Add a wait() into Tynexx's version.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:37 PM
Doesn't work..

What am I missing? When they are on that certain brick I want them to teleport back to that brick.

wait()
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c.Humanoid.Died:connect(function()
c:MoveTo(147.38, 0.815, -193.13)
end)
end)
end)
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
12 Jul 2014 08:38 PM
Try this,
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c.Humanoid.Died:connect(function()
wait(SecondsHere)
c:MoveTo(Vector3.new(147.38, 0.815, -193.13))
end)
end)
end)
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:41 PM
It works but they can die anywhere and it will teleport to that spot.
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
12 Jul 2014 08:43 PM
My suggestion would be to create a table and upon it being touched, add a check to make sure it's a player and if it is then add that player's name into the table.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:45 PM
I've been thing something a script like this. Although I have no idea if it is right.

function teleport()
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c.Humanoid.Died:connect(function()
wait(1)
c:MoveTo(Vector3.new(147.38, 0.815, -193.13))
end)
end)
end)

end

onTouch = false

if else
while true do
onTouch = True
do
function.teleport()
end
end
end
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
12 Jul 2014 08:49 PM
Now I understand what you want,
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
Character["Left Leg"].Touched:connect(function(Toucher)
if Toucher.ClassName == "Part" then
Character.Humanoid.Died:connect(function()
wait(SecondsHere)
Character:MoveTo(Toucher.Position)
end)
end
end)
end)
end)
That would be an example and will need to be rewritten as necessary.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:50 PM
Wait, so what would need to be rewritten in it?
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
12 Jul 2014 08:51 PM
It would have to be adjusted to work with what you currently have, try it out and I'll try to create a new one if it doesn't work.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:55 PM
Character:MoveTo(Toucher.Position)

When you say (Toucher.Position) do you mean the coords?
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
12 Jul 2014 08:55 PM
Yes.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
12 Jul 2014 08:57 PM
Oh.
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