Bulvyte
|
  |
| Joined: 21 May 2014 |
| Total Posts: 716 |
|
|
| 18 Jul 2016 06:12 AM |
attempt to index local 'player' (a nil value) -.- how do you fix it....
So this should teleport if the player name exists in the list of "admins" if it does teleport it if it doesn't don't do anything.
admins = {"Player1", "Player2"} -- -- repeat wait() until game.Players.LocalPlayer and -- game.Players.LocalPlayer.Character -- function teleportPlayer(pos, torso) -- local char = torso -- char.CFrame = CFrame.new(Vector3.new(pos.x, pos.y + 7, pos.z)) -- end -- -- ------------------------------------------------------------------------------
script.Parent.Touched:connect(function(part) local player = game.Players:FindFirstChild(part) if player.Name ~= admins then teleportPlayer(Vector3.new(-905, 108.7, 136), part.Parent.Torso) else if player.Name == admins then return end end end)
|
|
|
| Report Abuse |
|
|
| 18 Jul 2016 07:03 AM |
Your code searches for the client called "part".
|
|
|
| Report Abuse |
|
Bulvyte
|
  |
| Joined: 21 May 2014 |
| Total Posts: 716 |
|
|
| 18 Jul 2016 07:37 AM |
it doesn't matter rofl... i fixed it anyways forget it.
|
|
|
| Report Abuse |
|