|
I can't test it because it's meant for a private server...
function onRespawn(character)
if game.Players:FindFirstChild(character) ~= nil then
player = game.Players:FindFirstChild(character)
if player:HasBuildPermission("Admin") == true then
game.Lighting.Teleport:clone().Parent = player.Backpack
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.CharacterAdded:connect(onRespawn)
end
game.Players.PlayerAdded:connect(onPlayerEntered) |
|
AgentFirefoxTop 100 PosterJoin Date: 2008-06-20 Post Count: 22404 |
FindFirstChild(character.Name) |
|
|
|
This is DarkLuigiLType
Still doesn't work. |
|
|
I don't understand. What's wrong with it? I see no syntax errors. |
|
|
SDuke524Join Date: 2008-07-29 Post Count: 6267 |
I'm guessing you were thinking of `:GetPlayerFromCharacter()` because of how you called `:FindFirstChild()` which it would be more efficient but doesn't make a serious difference. |
|
|
My only concern right now is making it functional. Which it isn't. |
|
SDuke524Join Date: 2008-07-29 Post Count: 6267 |
output? |
|
|
How am I supposed to test output on a private server?
No output in solo |
|
SDuke524Join Date: 2008-07-29 Post Count: 6267 |
...
http://www.roblox.com/Server-Error-Monitoring-System-item?id=65774258
local bool,error=coroutine.resume(coroutine.create()
function onRespawn(character)
if game.Players:FindFirstChild(character) ~= nil then
player = game.Players:FindFirstChild(character)
if player:HasBuildPermission("Admin") == true then
game.Lighting.Teleport:clone().Parent = player.Backpack
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.CharacterAdded:connect(onRespawn)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
end));
if bool then
Instance.new("Message",workspace).Text=error;
else
Instance.new("Message",workspace).Text="No error detected";
end |
|
VoidacityJoin Date: 2009-11-05 Post Count: 15759 |
[ Content Deleted ] |
|
SDuke524Join Date: 2008-07-29 Post Count: 6267 |
@ox
I just copied and pasted the code from the top. She can fix it on her own. |
|
|
VoidacityJoin Date: 2009-11-05 Post Count: 15759 |
[ Content Deleted ] |
|
mage11561Join Date: 2008-09-03 Post Count: 13217 |
You could go to Start Server -> Start Player, same area where Test is located. |
|