Localscript cant pick up remoteevent

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    i am creating a tool, and when the tool is activated i wanted a script to fire a event in the tool after an amount of time

  2. What is the issue? Include screenshots / videos if possible!
    checking output the localscript basically ignores the remoteevent’s existence (they are both parented to the tool)

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i’m just assuming it should work because its formatted similarly to how a server script detects a remoteevent, and that works within a tool. i have casted a remotevent from client to server many times in the past. are the circumstances just wrong?

local disabled = false
script.Parent.punch.OnClientEvent:Connect(function()
	if disabled == false then
		disabled = true
		game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
	else
		disabled = false
		game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
	end
end)
1 Like

Can you post LocalScript source please?

What is “punch” and where is this script?

Is this a LocalScript inside of a RemoteEvent?

to clear up any confusion, the code is the localscript and “punch” is the remoteevent. they are all parented to a tool.