I can't seem to figure out what to do, the script works in solo but I found out that it errors in the server (using the ROBLOX error monitor) and all it says is "attempt to call a nil value). the script is located in the ServerScriptService
local rs = game:service'ReplicatedStorage'
local ss = game:service'ServerStorage'
local sss = game:service'ServerScriptService'
local players = game:service'Players'
do -- client drivers
local clientDrivers = rs.ClientDrivers
function PlayerAdded(player)
local drivers = clientDrivers:clone()
drivers.Name = 'Drivers'
drivers.Parent = player
for _, driver in next, drivers:GetChildren() do
driver.Disabled = false
end
end
if game.PlaceId == 0 then -- solo/test
PlayerAdded(players:WaitForChild'Player1')
else -- real game
players.PlayerAdded:connect(PlayerAdded(player))
end
end |