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 » Scripters
Home Search
 

Re: Help with the Teleport script here? :)

Previous Thread :: Next Thread 
udayk8139 is not online. udayk8139
Joined: 25 Aug 2013
Total Posts: 622
07 Jan 2015 07:25 AM
Time = 10 -- TIme to Teleport the player
Pad = script.Parent -- difine primary part, the pad.
fly = Instance.new("BodyPosition")
fly.Position = CFrame.new(0,50,0) --[[ Set properties, I only want to change this as everything else is fine for me.]]


function teleportOntouch(hit) -- making a function to pull the player up (tp)
local Player = hit.Parent --[[ get player, this is not working i guess, or idk I have CONFUSIOON WITH THE SIMPLE ARGUMENTS, Even Seranok's explianation was soooo complicated, so pls HALP! ]]
fly:clone().Parent = Player.Torso -- Now if the abiove script worked, I CAN FINNALY PUT THE TP MAIN THING INTO PLAYER's Torso!!

-- Now lets take the fly out as our player reached our place...
wait(Time)
Player.Torso.Fly:Remove() -- hurrah! done! :D

end

Pad.Touched:connect(teleportOntouch) -- THis connects the power to the machine


It's not working, Can you guys help me debug it? I checked it but found no error, Maybe it's at the player variable... :O help me. Thanks.
Report Abuse
udayk8139 is not online. udayk8139
Joined: 25 Aug 2013
Total Posts: 622
07 Jan 2015 07:30 AM
Help would be appreciated.
Report Abuse
udayk8139 is not online. udayk8139
Joined: 25 Aug 2013
Total Posts: 622
07 Jan 2015 07:48 AM
Help me? Pls?
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
07 Jan 2015 07:56 AM
thats not Teleporting :P
thats Flying to a Place
Report Abuse
udayk8139 is not online. udayk8139
Joined: 25 Aug 2013
Total Posts: 622
07 Jan 2015 07:59 AM
I call it Teleporting. And, Teleporting also means moving plays inside a "place". There are locations in a place too.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
07 Jan 2015 08:01 AM
Teleporting is wen a Person is moved to a Place in a Flash...
but wat ur using, is called Transportation
Report Abuse
warriorqaz is not online. warriorqaz
Joined: 09 Oct 2009
Total Posts: 726
07 Jan 2015 08:14 AM
If you want to teleport, then just move the Torso's CFrame to the place you want it to go.

If you want to fly, then follow these steps:

1. Point torso to end position
>torso.CFrame = CFrame.new(torso.Position, endpoint.Position)

2. Instance body velocity
>bV = Instance.new("BodyVelocity", torso)

3. Fly the player
>bV.Velocity = torso.CFrame.lookVector * speed

Hope this works/helps!
Report Abuse
udayk8139 is not online. udayk8139
Joined: 25 Aug 2013
Total Posts: 622
07 Jan 2015 08:27 AM
Ty
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
07 Jan 2015 08:57 AM
local P = game.Players:GetPlayerFromCharacter(hit.Parent) -- finds the player
if p then -- if player is really there
local Player = P.Character -- the body of the player
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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