Scripting freezer help

I have no idea how to script and can’t get ahold of the maker so I have no idea what the issue is.

local rs = game:GetService("ReplicatedStorage")
local event = rs:FindFirstChild("openGUI")

local detParts = { }

for _,v in pairs(script.Parent:GetChildren()) do
	if v:IsA("Part") and string.sub(v.Name, 1, 9) == "DETECTION" then
		table.insert(detParts, v.Name)
	end
end

for _,v in pairs(detParts) do 
	script.Parent:FindFirstChild(v).Touched:Connect(function(obj)
		if obj.Parent:IsA("Model") and game.Players:FindFirstChild(obj.Parent.Name) ~= nil then
			local plr = game.Players:FindFirstChild(obj.Parent.Name)
			event:FireClient(plr, string.sub(v, 11), true)
		end
	end)
	script.Parent:FindFirstChild(v).TouchEnded:Connect(function(obj)
		if obj.Parent:IsA("Model") and game.Players:FindFirstChild(obj.Parent.Name) ~= nil then
			local plr = game.Players:FindFirstChild(obj.Parent.Name)
			event:FireClient(plr, string.sub(v, 11), false)
		end
	end)
end

This is the error: [20:39:44.605 - Workspace.Freezers.FreezersServer:24: attempt to index nil with ‘FireClient’]

GIF of error: https://gyazo.com/0f09a0bedfd1444280bbc5de33553916

1 Like

local event = rs:WaitForChild(“openGUI”)


local event = rs:FindFirstChild(“openGUI”) is not the problem. It has something to do with the FireClient line.

is the event Archivable? If it isn’t the script won’t be able to find it.

Make sure the RemoteEvent inside of ReplicatedStorage is correctly named as openGUI.

How do I check if the event is archivable?

Check the properties. It should have thé archivable button.