So i want to detect when the player clicks so i can give them points though my script wont work, it shows no errors or anything, it is a local script inside of the GUI
local ReplicatedStorage = game:GetService("ReplicatedStorage")
while true do
wait(0.01)
if ReplicatedStorage.PlayerLoaded == true then
print("load successful for "..game.Players.LocalPlayer.Name)
script.Parent.Frame.Visible = true
local Cooldown = false
local Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.Button1Down:Connect(function()
if Cooldown == false then
ReplicatedStorage.ClickEvent:FireServer()
Cooldown = true
wait(0.1)
Cooldown = false
end
end)
end
end

1 comment
i don't see anywhere in the script that would give them points