Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Delays = {}
- local Cooldown = 1
- local function CheckLastTeleport(PlrName: string)
- if not Delays[PlrName] then
- Delays[PlrName] = os.clock()
- return true
- else
- if os.clock() - Delays[PlrName] >= Cooldown then
- Delays[PlrName] = os.clock()
- return true
- else
- return false
- end
- end
- end
- for _, v in ipairs(script.Parent:GetChildren()) do
- if v:IsA("BasePart") then
- v.Touched:Connect(function(H)
- if H.Parent:FindFirstChild("Humanoid") then
- local Plr = H.Parent
- if CheckLastTeleport(Plr.Name) then
- Plr:PivotTo(v.To.Value.CFrame + Vector3.new(0,2,0))
- end
- end
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement