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

Why is this script not working?

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

3 comments

0

Are you receiving any errors in the output?

0

I'll check...

0

Yeah, apparently there is an error in the first line...

1 answer

✓ Accepted answer

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

3 comments

0

mehh. Still not working. Sorry, I'll have to find another way to script it another day

0

Script has to be inside the part the selectionbox is

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

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