Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local hrp = character:WaitForChild("HumanoidRootPart")
- -- Create a large part
- local part = Instance.new("Part")
- part.Size = Vector3.new(100000, 1, 100000)
- part.Position = Vector3.new(0, -50, 0)
- part.Name = "Anti Fall"
- part.Anchored = true -- Anchor the part so it stays in place
- part.Parent = game.Workspace
- part.Color = Color3.new(1, 1, 1)
- -- When something touches the part
- part.Touched:Connect(function(hit)
- -- Check if the touching part belongs to a character
- local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
- if humanoid then
- hrp.CFrame = CFrame.new(0, math.random(200, 500), 0) -- Teleport the player
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement