I've been trying to get the Touched event to work with FilteringEnabled multiple times, no success. I'm sort of a beginner at FE so it might be the script. Code below. (The script that is being enabled fires an event)

script.Parent.Touched:connect(function(hit)
	if hit.Name == "Mine" and hit.Owner.Value ~= script.Parent.Parent.Owner.Value then
		local ffc = game.Players:FindFirstChild(hit.Owner.Value)
		if ffc then
			ffc.PlayerGui.MineHandler2.Disabled = false
		end
	end
	
end)

6 comments

0

Is it in a local script or a script??

0

The touched script is a ServerScript, but the handler is local.

0

This is because the contents of the playergui that aren't created by a serverscript are 'client only', I recommend cloning it to the playergui instead

0

serverscripts cannot access playergui

0

oh that is why, I was also experiencing the same thing

0

But can I just do ontouched in a localscript and fire the event from there?