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

Can someone give me some verification for a little script?

Asked by 6 years ago

hi im still new to this so be kind please.

I'm just testing around and messing around.

how is this?

if child.Value == 1 then child.Value = 2 end

its not working, so i'm here asking what i can improve on.

Thanks

0
this isnt a request, please dont give me a working script, just tell me how i can improve, thanks! Pr_ogram 17 — 6y
0
I reccommend you to put a wait inbetween of the switching values. Talveka 31 — 6y

1 answer

Log in to vote
-1
Answered by 6 years ago
Edited 2 years ago
while true do
if child.Value == 1 then
child.Value = 2
end
wait(0.1)
end

THIS ANSWER SUCKS PLEASE DO NOT USE IT I SWEAR TO GOD

0
You should also make use of loops to do something that you want to do. It's going to repeat it. TheBlackDeveloper 0 — 6y
0
No, you NEVER use loops for things like that. You should also indent your code, as it's illegible unindented. Use a Changed event instead of a loop. Stop teaching bad practice. User#19524 175 — 6y
Ad

Answer this question