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

Sometimes my script works and sometimes it wont. Has to do with FireClient, how do I fix this?

Asked by 2 years ago
local opener = game.Workspace.OpenShop.Opener

local debounce = false


opener.Touched:Connect(function(hit)
    if not debounce then
        debounce = true

        local player = game.Players:GetPlayerFromCharacter(hit.Parent)

game.ReplicatedStorage.ShowGui2:FireClient(player)

        wait(4)
        debounce = false

    end
end)

I'm a little more new to scripting. Sometimes it will say error on line 12 which is the FireClient line. But sometimes it wont say that and my script will work.

0
What is the exact error you are getting? ColdFoxy07 76 — 2y

Answer this question