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

script not working ?

Asked by 9 years ago

suppose to create a model in the Lighting with the players name but does nothing

print 'Script Running!'

game.Players.PlayerAdded:connect(function(ply)

ply:WaitForDataReady()
local ct = ply:LoadInstance(1)
if ct ~= nil then
pack = ct
pack.Parent = game.Lighting
else

local pack = Instance.new("Model",game.Lighting)
pack.Name = ply.Name.."sPack"

end
end)

game.Players.ChildRemoved:connect(function(ply)
ply:WaitForDataReady()
ply:SaveInstance(1, game.Lighting:FindFirstChild(ply.Name.."sPack"))
game.Lighting:FindFirstChild(ply.Name.."sPack"):Remove()
end)

Answer this question