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: Teleporter not working..

Previous Thread :: Next Thread 
Bulvyte is not online. 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
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
18 Jul 2016 07:03 AM
Your code searches for the client called "part".


Report Abuse
Bulvyte is not online. 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
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