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
|
  |
| Joined: 25 Aug 2013 |
| Total Posts: 622 |
|
|
| 07 Jan 2015 07:30 AM |
| Help would be appreciated. |
|
|
| Report Abuse |
|
|
udayk8139
|
  |
| Joined: 25 Aug 2013 |
| Total Posts: 622 |
|
| |
|
|
| 07 Jan 2015 07:56 AM |
thats not Teleporting :P thats Flying to a Place |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 25 Aug 2013 |
| Total Posts: 622 |
|
| |
|
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 |
|
|