Now for some reason client started freaking out and sending 3-4 events at 1 click wth is wrong with my code
local buyEvent = rs.WeaponSystemEvents.Buy
loadout.BuyDescFrame.BuyButton.MouseButton1Click:Connect(function()
local price = getpriceEvent:InvokeServer(currentweapon)
print("clicked the buy button", plr)
ActualUI.BuyPrompt.PriceLabel.Text = price
ActualUI.BuyPrompt.QuestionLabel.Text = "Are you sure you want to buy " .. currentweapon .. " for:"
ActualUI.BuyPrompt.Visible = true
ActualUI.BuyPrompt.OK.MouseButton1Click:Connect(function()
print("the guy is trying to buy the weapon", plr) --this is being printed out 3 times
buyEvent:FireServer(currentweapon)
ActualUI.BuyPrompt.Visible = false
end)
end)