Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- put into StarterCharacterScripts
- HumanoidRootPart = script.Parent:WaitForChild('HumanoidRootPart')
- Reason = "NaN value detected."
- game:GetService("RunService").RenderStepped:Connect(function()
- pcall(function()
- if ((string.lower(tostring(math.abs(HumanoidRootPart.CFrame.X)))) and (string.lower(tostring(math.abs(HumanoidRootPart.CFrame.Y)))) and (string.lower(tostring(math.abs(HumanoidRootPart.CFrame.Z))))) == string.lower("nan") then
- game.Players[script.Parent.Name]:Kick(Reason)
- end
- end)
- pcall(function()
- if ((tostring(string.lower(math.abs(HumanoidRootPart.CFrame.X)))) and (tostring(string.lower(math.abs(HumanoidRootPart.CFrame.Y)))) and (tostring(string.lower(math.abs(HumanoidRootPart.CFrame.Z))))) == string.lower("nan") then
- game.Players[script.Parent.Name]:Kick(Reason)
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement