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

How to make a percentage system for opening a door?

Asked by 4 years ago
Edited 4 years ago

Hey, So i have been looking around the internet for ages trying to find a percentage system. I want a keycard to have a percentage of opening a door but all the things i found do not really work.

This is what i tried and it is probably horribly wrong but i am still learning:

script.Parent.Touched:Connect(function(hit)


       hit.Parent.Name == "FAKEKeycard" then
        math.random(1,10)
        if math.random == 3 then
        script.Parent.CanCollide = false
        script.Parent.Transparency = 0.5
        wait(2)
        script.Parent.CanCollide = true
        script.Parent.Transparency = 0
        end

    end

0
you for got to put if before your statement in line 4. Yuuwa0519 197 — 4y
0
forgot* Yuuwa0519 197 — 4y

Answer this question