Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why isn't the local script activating?

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.

2 comments

0

Have you tried print debugging

0

Yeah, the local script just doesn't activate when the event is fired

1 answer

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

2 comments

0

In server script service, none of them are disabled, and it is firing

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?

This discussion is preserved as it was. New answers, comments, and votes are closed.