Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help solve the problem of Obesity with scripting!?

Asked by 11 years ago

Helping me with this script will help me complete my game, which promotes fruit, which will help the problem of obesity!

This script is meant to: Load when picking a fruit; showing as a loading bar Once loaded give the fruit/ xp, etc...

This script works until the player lifts the button up. Then it still does done() and does it in the background until you try and pick another fruit where it gives you a load of fruit at the same time, then randomly gives you fruit...

Yeah, it's really messed up. I have no idea why could you help me make this place awesome? Credit will be given! :D

Place: http://www.roblox.com/Nature-V-0-02-place?id=139229308

01local fruit, fruitTop, x, y, z, done = script.Parent, script.Parent.Fruit, false, true, true, false      
02xpamount = 10 -- xpamount
03 
04script.Parent.ClickDetector.MouseClick:connect(function(plr)
05if x == false then
06    x = true
07 
08    barframe = plr.PlayerGui.ProgressBar.Frame
09    bar = barframe.Bar
10    pick = plr.PlayerGui.ProgressBar.Pick
11 
12    pick.Visible = true
13 
14    pick.MouseButton1Down:connect(function() -- Pick Button/ Progress bar animation
15        if y == true then
View all 53 lines...

end)

1
Your propaganda is confusing and incredibly naïve. BlueTaslem 18071 — 11y
0
I fixed it, it doesn't have to hurt your brain any more. 1234Christopher 10 — 11y

1 answer

Log in to vote
0
Answered by 11 years ago

Fixed it- mainly not putting (x = true) in the right places and I cleared it up :)

Play it here to test it for me! (Probably still some glitches)

Place: http://www.roblox.com/Nature-V-0-02-place?id=139229308

Ad

Answer this question