Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make a value giver on click?

This is my script so far I have made a leaderboard script, but I make a script that gives the Player 1+ of wheat? This is my script.

function onclicked() script.Parent.Transparency = 10 wait (10) script.Parent.Transparency = 0 end

script.Parent.ClickDetector.MouseClick:Connect(onclicked)

I have tried this, but it does not work.

function onclicked() Value.Wheat = Value.Wheet +10 script.Parent.Transparency = 10 wait (10) script.Parent.Transparency = 0 end

script.Parent.ClickDetector.MouseClick:Connect(onclicked)

1 answer

✓ Accepted answer
function onclicked()
Value.Wheat.Value = Value.Wheat.Value +10-- spelled wheat wrong im assuming this is a int value also
 script.Parent.Transparency = 1 -- transparency is between 1 and 0 so 10 is just 1 so put 1
 wait (10) 
script.Parent.Transparency = 0
 end

This discussion is preserved as it was. New answers, comments, and votes are closed.