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

I have 2 scripts here but when I use both of them there just both 1, fix please?

Asked by 4 years ago

so here are the scripts, how do i make it 2

this one prints 1 on touch.

01local pedestal = 0
02 
03function hit2()
04    wait(0.1)
05    if script.Parent.Transparency == 0.5 then
06        pedestal = pedestal + 1
07        print(pedestal)
08        script:Destroy()
09    end
10end
11 
12script.Parent.Touched:Connect(hit2)

this one also prints 1 on touch

01local pedestal = 0
02 
03function hit2()
04    wait(0.1)
05    if script.Parent.Transparency == 0 then
06        pedestal = pedestal + 1
07        print(pedestal)
08        script:Destroy()
09    end
10end
11 
12script.Parent.Touched:Connect(hit2)

1 answer

Log in to vote
1
Answered by 4 years ago

nevermind, im just using an intvalue instead

Ad

Answer this question