Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Aquí esta el script de teletransportación:
- script.Parent.Touched:Connect(function(Touch)
- local HumanoidRootPart = Touch.Parent:FindFirstChild("HumanoidRootPart")
- if HumanoidRootPart then
- HumanoidRootPart.CFrame = Vector3.new(-> Borra esto y escribe la posición)
- print("-> Posicion")
- end
- end)
- Aquí esta el script de teletransportación a un lugar aleatorio:
- local Y
- local X
- script.Parent.Touched:Connect(function(Touch)
- local HumanoidRootPart = Touch.Parent:FindFirstChild("HumanoidRootPart")
- if HumanoidRootPart then
- X = math.random(-> Valor X minimo, -> Valor X máximo)
- Y = math.random(-> Valor Y minimo, -> Valor Y máximo)
- HumanoidRootPart.CFrame = Vector3.new(X, Y, -> Valor Z)
- print("Teleported to: " .. X .. ", " .. Y .. ", -> Valor Z")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment