Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Touched doesn't work with FilteringEnabled?

Asked by
1GlF 42
5 years ago

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)
0
Is it in a local script or a script?? BetterNotDie 11 — 5y
0
The touched script is a ServerScript, but the handler is local. 1GlF 42 — 5y
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 User#20388 0 — 5y
0
serverscripts cannot access playergui mudathir2007 157 — 5y
View all comments (2 more)
0
oh that is why, I was also experiencing the same thing RainbowBeastYT 85 — 5y
0
But can I just do ontouched in a localscript and fire the event from there? 1GlF 42 — 5y

Answer this question