So yeah, I think I’m just being really dumb here, but can someone review my code?
SERVER CODE:
function NewRound(MiniGame, transmissionlength)
--im vommiting from this code
local placevector = Vector3.new(0, 0, 0)-- defaults to 0
if MiniGame == "RedLight" then
print("RedLight Was Chosen")
placevector = Vector3.new(100, 0, 100) -- example area
game.ReplicatedStorage.RoundSystem.TransportLocalPlayers:FireAllClients(MiniGame, transmissionlength, placevector)
elseif MiniGame == "Example2" then
print("Example")
else
print("Invaild MiniGame Type!")
end
end
NewRound("RedLight", 10)
One thing I’m seeing is that you have a plr parameter in your local code. FireAllClients() does not specify specific players when it executes, as it fires to all clients, so that parameter will be nil.
function NewRound(MiniGame, transmissionlength)
-- im vomiting from this code
local placevector = Vector3.new(0, 0, 0) -- defaults to 0
if MiniGame == "RedLight" then
print("RedLight Was Chosen")
placevector = Vector3.new(100, 0, 100) -- example area
game.ReplicatedStorage.RoundSystem.TransportLocalPlayers:FireAllClients(MiniGame, transmissionlength, placevector)
elseif MiniGame == "Example2" then
print("Example")
else
print("Invaild MiniGame Type!")
end
end
NewRound("RedLight", 10)
Also, consider that the player might not have joined by the time :FireAllClients() has ran. Notice how it says RedLight Was Chosenbefore=== Join Completed ===.
Adding a delay worked. Keep in mind this is not a permanent solution. You should tell new clients what minigame is currently ongoing, but I’ll leave implementing that to you.