of     1   

LEG0builder
#30765036Tuesday, August 03, 2010 3:54 PM GMT

Anyone know how it works? Like, I tried this to test: function onTouched(hit) if hit.Parent.Humanoid ~= nil then hit.Parent.Name:GetPlayerFromCharacter(player) print(player) end end script.Parent.Touched:connect(onTouched) and it returned: attempt to call method 'GetPlayerFromCharacter' (a nil value) although I am quite sure that it exists...
Camoy
#30765119Tuesday, August 03, 2010 3:55 PM GMT

hit.Parent:GetPlayerFromCharacter() not a method of string.
Spaniel77
#30765273Tuesday, August 03, 2010 3:57 PM GMT

function onTouched(hit) if hit.Parent.Humanoid ~= nil then player = game.Players:GetPlayerFromCharacter(hit.Parent) if player ~= nil then print(player.Name) end end end script.Parent.Touched:connect(onTouched)
Snej1
#30765367Tuesday, August 03, 2010 3:58 PM GMT

function onTouched(hit) player=hit.Parent.Name:GetPlayerFromCharacter(hit.Parent) if player~=nil then print(player.Name) end end
Snej1
#30765447Tuesday, August 03, 2010 4:00 PM GMT

Whoops script.Parent.Touched:connect(function(hit) player=hit.Parent.Name:GetPlayerFromCharacter(hit.Parent) if player~=nil then print(player.Name) end end)
Snej1
#30765500Tuesday, August 03, 2010 4:00 PM GMT

Whoops again script.Parent.Touched:connect(function(hit) player=game.Players:getPlayerFromCharacter(hit.Parent) if player~=nil then print(player.Name) end end)
Camoy
#30765505Tuesday, August 03, 2010 4:00 PM GMT

You people have no clue... script.Parent.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") then local player = game.Players:findFirstChild(hit.Parent.Name) if player then print(player.Name) end end end)

    of     1