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

Why isn't the local script activating?

Asked by
Viking359 161
6 years ago

I have a map script that doesn't work with FE(it works without it, though). The server script in SSS fires a remote event, which is supposed activates a local script in StarterPlayerScripts to make a gui.

--firing part of server script
local re = game:GetService("ReplicatedStorage").RemoteEvents.Regen
re:FireAllClients()--it successfully fires
--local script
local rs = game:GetService("ReplicatedStorage")
local re = rs.RemoteEvents.Regen
local player = game.Players.LocalPlayer
re.OnClientEvent:Connect(function()
    local gui = player:WaitForChild("PlayerGui")
    local f = rs.GUI
    local clock = gui:WaitForChild("Timer").TextLabel
    local a = f.Regen:Clone()
    a.Parent = gui
    local b = f.CloseRegen:Clone()
    wait(9.5)
    b.Parent = gui
    wait(.5)
    a:Destroy()
    b:Destroy()
    player.Character:BreakJoints()
    clock.Text = "300"
end)

Keep in mind there are no errors, and everything is valid. I'm going to add security after I get the script to actually work.

0
Have you tried print debugging Goulstem 8144 — 6y
0
Yeah, the local script just doesn't activate when the event is fired Viking359 161 — 6y

1 answer

Log in to vote
0
Answered by
H4X0MSYT 536 Moderation Voter
6 years ago

Or does the server not fire it? Script not disabled? In Server Script Storage?

0
In server script service, none of them are disabled, and it is firing Viking359 161 — 6y
0
If statements? Everything like that can cause it. Make a script that doesnt have anything but a statement that fires the event. Does it work then? H4X0MSYT 536 — 6y
Ad

Answer this question