Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a Player teleported into a prison?

Asked by 7 years ago

Hello! Apex back again. I am back with another script, but made by my friend "Dxsigned". So what he is trying to do is, Whoever player name is the script, when he/she joins, they are teleported into a prison. He tried using instances. The main purposes is to get a player teleported in the prison if their name is in the script. Thank you sm.

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,500,0)   p.Size = Vector3.new(50,0,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(25,501,0)  p.Size = Vector3.new(0,50,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(-25,501,0) p.Size = Vector3.new(0,50,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,501,25)  p.Size = Vector3.new(50,50,0)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5            

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,501,-25) p.Size = Vector3.new(50,50,0)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5            


p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,525,0)   p.Size = Vector3.new(50,0,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

p= game.Players:GetChildren()       
for i= 1, #p do     
    if p[i] ~= "NAME" then              
    p[i].Character.Torso.CFrame = CFrame.new(0,515,0)

P.S. Script is made by Dxsigned.

0
Are you trying to teleport players with a matching username into a prison? PyccknnXakep 1225 — 7y
0
Yes. IIApexGamerII 76 — 7y

1 answer

Log in to vote
0
Answered by
xEiffel 280 Moderation Voter
7 years ago

Here's the script

  • Instead of *CFrame I used :MoveTo() and in the brackets I put the spawn location which is (p1)

  • There is a wait statement because not everything loads fast so It needs some time to find out that player is in players

p1 = Instance.new("Part")    p1.Anchored = true   p1.Position = Vector3.new(0,500,0)   p1.Size = Vector3.new(50,0,50)   p1.Parent = game.Workspace   p1.Locked = true     p1.Transparency = 0.5        

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(25,501,0)  p.Size = Vector3.new(0,50,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(-25,501,0) p.Size = Vector3.new(0,50,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,501,25)  p.Size = Vector3.new(50,50,0)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5            

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,501,-25) p.Size = Vector3.new(50,50,0)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5            


p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,525,0)   p.Size = Vector3.new(50,0,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

wait(1)
p= game.Players:GetChildren()       
for i= 1, #p do     
    if p[i] ~= "NAME" then              
    p[i].Character:MoveTo(p1.Position)
end
end
0
Tysm IIApexGamerII 76 — 7y
Ad

Answer this question