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

Why is this script not working?

Asked by 9 years ago

For some reason this script doesn't seem to be working. Can anyone help me fix it?

if script.Parent.Health = >100 then
    script.Parent.Parent.Part.SelectionBox.Visible = false
    wait(3)
    script.Parent.Health == 100
    script.Parent.Parent.Part.SelectionBox.Visible = true
end
0
Are you receiving any errors in the output? RedCombee 585 — 9y
0
I'll check... Naughtyrobot 0 — 9y
0
Yeah, apparently there is an error in the first line... Naughtyrobot 0 — 9y

1 answer

Log in to vote
-1
Answered by
iLegitus 130
9 years ago

Right,Here we go... By the way use == if you want it to mean equal to Or use > if you want it to mean greater then

if script.Parent.Health == 100 then
script.Parent.Parent.Part.SelectionBox.Visible = false
wait(3)
script.Parent.Health = 100
script.Parent.Parent.Part.SelctionBox.Visible = true
end
0
mehh. Still not working. Sorry, I'll have to find another way to script it another day Naughtyrobot 0 — 9y
0
Script has to be inside the part the selectionbox is iLegitus 130 — 9y
0
Oh. it was working but it was transperent so the bullets were going through :S I just remembered the gun i am using has a script to make it go through invisible parts. I fixed it by making transparency 0.999. Thanks for the scripting help though :D Naughtyrobot 0 — 9y
Ad

Answer this question