Remote Event not working

Hello, recently my remote events stopped working, any idea why?

Simplyfied version of script (Original is longer)

Server Script

script.Parent.RemoteEvent.OnServerEvent:Connect(function()
script.Parent:Destroy()
end)

Local Script

script.Parent.ClickDetector.MouseClick:Connect(function()
script.Parent.RemoteEvent:FireServer()
end)

Part where scripts are located
image

Thanks for any help

Localscripts don’t work when they are a descendant of Workspace and not parented by a character model at the same time.

Plus, you can detect ClickDetector.MouseClick event from serverscript so you don’t even have to bother with remotes.

Plus, you can detect ClickDetector.MouseClick event from serverscript so you don’t even have to bother with remotes.

I’m using this as example, i have same problem in PlayerGuis and workspace

It should work under PlayerGUI though.

But looking at your instance tree yours is definitely is a descendant of workspace and not parented by a character model so it’s not gonna execute any code

This is local script in playergui

script.Parent.MouseButton1Click:Connect(function()
		game.ReplicatedStorage.Examples.Remotes.Request:FireServer()
	end)

Server

game.ReplicatedStorage.Examples.Remotes.Request.OnServerEvent:Connect(function(plr)
print("Event")
end)

Edit: No errors in console

It worked fine for me without any errors though.

It doesn’t work for me, can you send me your entire model?

image

Contents of the script scripts are exactly the same with yours.

Interesting, it doesn’t work for me… However on different place it works

Soo i guess it’s just a glitch and i wasted 5 hours of my life today…

Maybe that place has some sort of virus in it?

Nope, there aren’t any freemodels everything in that place is made by me and all plugins are off (expect plugins made by me)

More interesting, when i deleted the entire script and pasted same code into it it worked.