Here's my script.

db = false

local lvl = script.Parent.Parent.Level.Value

function onTouch(hit)
local p = game.Players:GetPlayerFromCharacter(hit.Parent)
if p~=nil and p.leaderstats.Level.Value>=lvl and db==false then
db = true
script.Parent.CanCollide = false
wait(0.8)
script.Parent.CanCollide = true
db = false
end
end

script.Parent.Touched:connect(onTouch)

2 comments

0

Please explain your question more. I dont understand what you are saying.

0

Please explain your question more. I dont understand what you are saying.