I am trying to make when a GUI Button is clicked, a RemoteEvent Fires, but i have a problem.
For some reason, it is firing twice, and i have no idea why, anyone know why?
My localscript:
local BuyButton = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ToolRequest = ReplicatedStorage:WaitForChild("ToolRequest")
BuyButton.MouseButton1Click:Connect(function()
ToolRequest:FireServer()
end)
My ServerScript:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ToolRequest = ReplicatedStorage:WaitForChild("ToolRequest")
ToolRequest.OnServerEvent:Connect(function()
print("event fired")
end)