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.

local pedestal = 0

function hit2()
    wait(0.1)
    if script.Parent.Transparency == 0.5 then
        pedestal = pedestal + 1
        print(pedestal)
        script:Destroy()
    end
end

script.Parent.Touched:Connect(hit2)

this one also prints 1 on touch

local pedestal = 0

function hit2()
    wait(0.1)
    if script.Parent.Transparency == 0 then
        pedestal = pedestal + 1
        print(pedestal)
        script:Destroy()
    end
end

script.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