You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? i want it so when you click 5 times you can get 1 resources in leaderstats here is the ouput and explorer
heres explorer
- What solutions have you tried so far? i havent tried any cause i cant find any
So ive been making a game and for some reason i cant get it to give me resources please help! btw this is in a model so it could just be that
local click = script.Parent.ClickDetector
local value = script.Parent.Value
local resources = game:WaitForChild("leaderstats"):WaitForChild("Resources")
click.MouseClick:Connect(function()
value.Value += 1
if value.Value == 5 then
resources.Value += 1
script.Parent.Transparency = 1
script.Parent.CanCollide = false
wait(10)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
value.Value = 0
end
end)