I have a problem with a script regarding remote events (events are actually just slamming me at this point lol)
Here is the script I'm using to fire the local script (bc this is a server script)
local repStorage = game:GetService("ReplicatedStorage") local remote = repStorage:WaitForChild("Remote") -- Variables local playercount = #game.Players:GetPlayers() print("This is the player Count") print(playercount) local req_num_players = 0 --while true do wait() -- repeat until used to make sure there are two people in the server before the games starts repeat print("Waiting for more players") wait() until playercount >= req_num_players print("enough players detected") print("Server Script passed the repeat until loop") wait() remote:FireAllClients(true) --print("FireAllClients just sent true to all clients") --end
Here is the local script
local repStorage = game:GetService("ReplicatedStorage") local remote = repStorage:WaitForChild("Remote") print("local script is running") remote.OnClientEvent:connect(function(decider) if decider then print("Server passed decider as true") loop_starter = decider return loop_starter else print("Server did not pass decider as true ") end end) print("Checking for loop_starter value") print(loop_starter)
The local script is in the starterplayerscripts and I called the remove event "remote" in replicated storage
thx
Your mistake is that your scripts are trying to find ReplicatedStorage.Remote
. While your remote is at ReplicatedStorage.remote
.