Advertisement
Hasli4

RBLX. TouchScript

May 15th, 2025
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local RESPAWN_DURATION = 3
  2. local ServerStorage = game:GetService("ServerStorage")
  3. local function onTouched(other)
  4.     if (other.Name == "HumanoidRootPart" or
  5. other.Name ==  "Cannon") then
  6.         local character = other.Parent
  7.         character.Parent = game:GetService("ReplicatedStorage")
  8. local explosion = Instance.new("Explosion", workspace)
  9. explosion.Position = character:GetPrimaryPartCFrame().p
  10. wait(RESPAWN_DURATION)
  11. character.Parent = workspace
  12.     character.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  13.     character.HumanoidRootPart.VectorForce.Force=Vector3.new(0,0,0)
  14.      end
  15. end
  16.  
  17.  
  18. script.Parent.Touched:Connect(onTouched)
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement