-- server script
local player = game.Players.PlayerAdded:Wait()
task.wait(5) -- remove other factors such as game loading in
local part = Instance.new("Part")
part.Name = "SpecialThing"
part.Parent = workspace
game.ReplicatedStorage.RemoteEvent:FireAllClients(part)
print("Fired", player, part)
the weird thing is, if I add a task.wait() before I fire on the server, the part isn’t nil
I could slap on a task.wait() and ignore this but I want to know why it happens and if there’s any way around a task.wait()
problem is that the parameter p is nil, but part exists on the client
The instance first gets sent in at nil, and your wait is after it is already set to nil. The instance variable doesn’t become anything other than nil after it was already set.