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

Help with FireClient?

Asked by
unmiss 337 Moderation Voter
8 years ago

My FireClient script isn't working.

Server script inside button with clickdetector:

script.Parent.ClickDetector.MouseClick:connect(function(plr)
    if plr:IsInGroup(2635050) and plr:GetRankInGroup(2635050) >= 2 then
        game.ReplicatedStorage.policegui:FireClient(plr)
        print("ok then")
    end
end)

Local script inside GUI:

local plr = game.Players.LocalPlayer

game.ReplicatedStorage.policegui.OnClientEvent:connect(function()
    print("ok")
    game.ReplicatedStorage.PoliceSpawner_UI:Clone().Parent = plr.Backpack
end)

"ok then" prints but "ok" does not and the GUI doesn't appear. Help?

Answer this question