Categories > Exploiting > Scripts >

[REQ] Check If Character is Alive So A Loop Will Continue

Posts: 4

Threads: 2

Joined: Dec, 2022

Reputation: 0

Posted

What happens is when my character dies it doesn't exist anymore which stops the loop. So if someone could add a check to detect the new humanoid to my script below that'll be great. Thanks

 

while true do wait()

game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.NAME.Character.HumanoidRootPart.CFrame

wait()

game:GetService("ReplicatedStorage").Events.Grab:FireServer(game:GetService("Players").NAME.Character:FindFirstChild("HumanoidRootPart"),"Grab")

game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-161, 54, 2612)

end

  • 0

Added

Thank you for the attempt Nick. This just grabs the player repeatdly without moving to the designated coordinates. But its understandable since you weren't able to test it before hand.

  • 0

Syraxes_

Web Developer

vip

Posts: 1307

Threads: 40

Joined: Jul, 2021

Reputation: 67

Replied

Hmm, Could you give me the url of the game to try some alternatives? Ty.

  • 0

I'm not lazy, I'm just highly motivated to do nothing. #I💚Dogs.

Posts: 59

Threads: 12

Joined: Feb, 2020

Reputation: 2

Replied

try this maybe

 

 while true do
  wait()
  if game.Players.LocalPlayer.Character.Humanoid ~= nil then
  game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.NAME.Character.HumanoidRootPart.CFrame
  wait()
  game:GetService("ReplicatedStorage").Events.Grab:FireServer(game:GetService("Players").NAME.Character:FindFirstChild("HumanoidRootPart"),"Grab")
  game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-161, 54, 2612)
  else
  break
  end
  end

  • 1

want something? add me on disccord !Spl||HasH!#7562

Posts: 4

Threads: 2

Joined: Dec, 2022

Reputation: 0

Replied

@lolollokug Unfortunately the loop still persist to stop.

  • 0

Posts: 59

Threads: 12

Joined: Feb, 2020

Reputation: 2

Replied

@Boombastic can you send the game link?

 

  • 0

want something? add me on disccord !Spl||HasH!#7562

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )