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

Remote event not firing to client?

Asked by
iladoga 129
5 years ago

I have a game that basically has a few maps and at the start of each round the server fires all clients for a remote events which gets the client to start a timer on their end. But the remote event wont fire at all??

Please help. SERVER

local maps = {"CrazyContainers"}

while true do
    print("Starting timer!")
    game:GetService("ReplicatedStorage").RemoteEventManager.Timer.BeginRound:FireAllClients(600)
    wait(600)
    print("Ending round")
    RemoteEvents.Timer.EndRound:FireAllClients()
    servervalues.AllowedToSpawn = false
    local NewMap = maps[math.random(1,#maps)]
    servervalues.CurrentMap.Value = NewMap
    game:GetService("ServerStorage").MapStorage[NewMap]:Clone().Parent = game.workspace
    for i,v in pairs(game.Workspace:GetChildren()) do
        if v:FindFirstChild("IsAMap") ~= nil then
            v:Destroy()
        end
    end
    for i,v in pairs(game:GetService("Players"):GetChildren()) do
        if v.PlayerValues.Spawned.Value == true then
            v.Character.Humanoid.Health = 0
        end
    end
    wait(3)
end

And yes I did double check everything is in the right location and nothing is outputting errors?

CLIENT

local plr = game:GetService("Players").LocalPlayer
local TimerEvents = game:GetService("ReplicatedStorage").RemoteEventManager.Timer

print("oof startting")
game:GetService("ReplicatedStorage").RemoteEventManager.Timer.BeginRound.OnClientEvent:Connect(function(maptime)
    print("OOOF")
    script.Parent.CountDown.Value = 600
    script.Parent.Text.Text = tostring(script.Parent.CountDown.Value)
    for i = 1,600 do
        wait(1)
        script.Parent.CountDown.Value = script.Parent.CountDown.Value-1
        script.Parent.Text.Text = tostring(script.Parent.CountDown.Value)
    end
end)

Thank you if anyone can help.

0
What is "script.Parent.Text.Text" User#19524 175 — 5y
0
That is a textlabel iladoga 129 — 5y
0
is script.Parent have a property named text, if not, it shouldn't matter; I think theking48989987 2147 — 5y
0
Its a textLabels text property iladoga 129 — 5y
View all comments (2 more)
0
Your FireAllClients() and OnClientEvent are set up perfectly fine as far as I can see. The code should AT LEAST get to FireAllClients() without any issues - which in turn should print "OOOF" perfectly fine. Are you saying that it doesn't even get that far? If so the only plausible issue is that you've set something up incorrectly. SummerEquinox 643 — 5y
0
Yes I do believe on the server it does get up to firing the client and no errors are showed I even set up a print system in the server t see if that line worked. I am rewriting the script hoping it can work this time. iladoga 129 — 5y

Answer this question