tigerr666
|
  |
| Joined: 13 Aug 2009 |
| Total Posts: 1665 |
|
|
| 22 Jun 2013 09:55 PM |
I'm not a beginner scripter, I'm actually near an intermediate scripter, but I can't get teleportation down. I'm trying to make a brick that teleports one player at a time when touched. And no, Its not using teles, I'm making this brick myself to move players to a certain position.
At first, I thought that p[i].Character was a good way to tele someone, until I just remembered that it teleports everyone at once, so I can't use this for an onTouched script. Does anyone know a script that can teleport one person at a time when a part is touched? The only thing I need help with is the teleportation itself, not fucntions and all.
I tried using game.Workspace.Player.CFrame, but that obviously only teleports the desired player. Any help? =/ |
|
|
| Report Abuse |
|
|
Voidion
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 2668 |
|
|
| 22 Jun 2013 10:00 PM |
MODELNAME:MoveTo(Vector3.new(0, 0, 0))
Moves a model to a position (the model would be the player's character). |
|
|
| Report Abuse |
|
|
tigerr666
|
  |
| Joined: 13 Aug 2009 |
| Total Posts: 1665 |
|
|
| 22 Jun 2013 10:02 PM |
| Yeah, but I want a script that can teleport different users as they touch it, not just one user. |
|
|
| Report Abuse |
|
|
tigerr666
|
  |
| Joined: 13 Aug 2009 |
| Total Posts: 1665 |
|
| |
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
|
| 22 Jun 2013 10:17 PM |
On touch you would have to set up a function
So..
function touch(h) -- If you're intermediate you know how to connect it so yeah. if h.Parent:findFirstChild("Humanoid") then -- I am just checking to make sure it is human h.Parent.Torso.CFrame = CFrame.new(1,1,1) -- Don't use Vector3 here it would kill the human end end
Basically you can either do moveTo:() or use CFrame on the Torso. |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 22 Jun 2013 10:20 PM |
Post your code.
", I thought that p[i].Character was a good way to tele someone"
If you're an intermediate, you should know all the loops, EVEN a numeric for loop. |
|
|
| Report Abuse |
|
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
| |
|
tigerr666
|
  |
| Joined: 13 Aug 2009 |
| Total Posts: 1665 |
|
|
| 23 Jun 2013 12:59 AM |
| @Ro, did you not here me say "I REMEMBERED that it teleports everybody at once." I didn't say I forgot. |
|
|
| Report Abuse |
|
|
tigerr666
|
  |
| Joined: 13 Aug 2009 |
| Total Posts: 1665 |
|
| |
|
pomopaul
|
  |
| Joined: 27 Aug 2011 |
| Total Posts: 174 |
|
|
| 23 Jun 2013 11:25 AM |
after the teleportation happens, make it activate a seperate script (thats disabled by default) that looks like this:
while true do YOUR SCRIPT LOCATION.Disabled = true wait(5) YOUR SCRIPT LOCATION.Disabled = false end |
|
|
| Report Abuse |
|
|
babyyip
|
  |
| Joined: 17 Mar 2012 |
| Total Posts: 4927 |
|
|
| 23 Jun 2013 11:27 AM |
player = game.Players.Player --you might want to change this... target = Vector3.new(20, 10, 20) --...and this
function fadeTo(a, b, c) for transparency = a, b, c do --go from a to b, counting by c
for _, part in pairs(player.Character:GetChildren()) do --for each of the objects in the character,
if part:IsA("BasePart") then --check if it's a part, and if so
part.Transparency = transparency --set its transparency end end wait(0.1) end end
fadeTo(0, 1, 0.1) --fade out, player.Character.Torso.CFrame = target --teleport the player fadeTo(1, 0, -0.1) --fade back in
Might be wrong
|
|
|
| Report Abuse |
|
|