|
| 20 Sep 2017 06:27 PM |
| i have a falling roof trigger when you step on a block, but then you step on it, many roofs appear, how do i make it so only # ###### here is the script: local function clone() local cloner = game.ServerStorage.Fallingroof1:Clone() cloner.Parent = game.Workspace end script.Parent.Touched:connect(function(hit) clone() end) |
|
|
| Report Abuse |
|
|
|
| 20 Sep 2017 06:29 PM |
| the hashtags are supposed to say: makes one roof |
|
|
| Report Abuse |
|
|
|
| 20 Sep 2017 06:39 PM |
add a debounce
local debounce = false local x = 4
local function clone() if debounce == false then debounce = true local cloner = game.ServerStorage.Fallingroof1:Clone() cloner.Parent = game.Workspace wait(x) debounce = false else print("no") end end
script.Parent.Touched:Connect(clone) --u dont need to connect another function to call a function unless u really needed that argument
#code error("you're*") |
|
|
| Report Abuse |
|
|