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

How do I fix this " Argument 1 missing or nil"?

Asked by 6 years ago

20:28:02.264 - Argument 1 missing or nil Says the problems at line 12?

local rs = game:GetService("ReplicatedStorage")
local SAF = rs.SAF
local CPSU = rs.CPSU
local Immigrant = rs.Immigrant
local Citizen = rs.Citizen

local playerAdded = rs.PlayerAdded


game.Players.playerAdded:Connect(function(player)
    wait()
    playerAdded:FireClient()
end)

Citizen.OnServerEvent:connect(function(splayer)
    splayer.TeamColor = BrickColor.new("Navy blue")

end)

Immigrant.OnServerEvent:connect(function(splayer)
    splayer.TeamColor = BrickColor.new("Dark stone grey")

end)

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
6 years ago

You need to supply the client that you wish to Fire the Remote's OnClientEvent for :)

On line 12:

playerAdded:FireClient(player)
0
good job User#19524 175 — 6y
0
Yeah Realised that after posting IcyBlazeRB 28 — 6y
Ad

Answer this question