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

How to fire a remoteevent?

Asked by 4 years ago

So I get this annoying error "FireEvent is not a valid member of RemoteEvent" How I can fix??

local repStorage = game:GetService("ReplicatedStorage")
local remote = repStorage:FindFirstChild("ButtonClick")

local button = script.Parent

local debounce = false

button.MouseButton1Click:Connect(function()
    if not debounce then
        debounce = true
        local playerPoints = game.Players.LocalPlayer.leaderstats.Yes
        remote:FireEvent(playerPoints)
        wait(1)
        debounce = false
    end
end)
1
Change FireEvent to FireServer Cynical_Innovation 595 — 4y
0
Where are you firing it to? Are you on a LocalScript or a Script? Phyrixia 51 — 4y
0
I am using a localscript Princess_Fexi007 0 — 4y
0
If you are using a local script then use :FireServer() TTHKKB 12 — 4y

Answer this question