Torso is not a valid member of Script
wait(5)
if game.Workspace.Abrobot.Torso.Velocity.magnitude > 0 then
print(324) end
Torso is not a valid member of Script
wait(5)
if game.Workspace.Abrobot.Torso.Velocity.magnitude > 0 then
print(324) end
Not sure what you're trying to accomplish here, if your character is R6 then torso should work, if it is R15 though you're going to want to search for "UpperTorso" or "LowerTorso"
--Lets grab the players from the game
players = game:GetService("Players")
--Wait for abrobot in the game's players
player = players:WaitForChild("abrobot")
--Grab the players character from the player
character = player.Character
--Grab the torso from the character
torso = character:FindFirstChild("Torso")
--Check velocity and print if its above 0
if torso.Velocity.magnitude > 0 then
print(324)
end
um im trying to test something and im using r6
Oops, put it all in a block quote on accident, you should be able to copy what I provided and it should print out when needed
still Infinite yield possible on 'Players:WaitForChild("abrobot")'
Depends on where you are testing it at, try changing abrobot to Player1, if you arent logged in on Studio it will default to Player1 as the player name
Use your Roblox Name exactly how it is. If it is Abrobot or abrobot. If you don't it won't detect it and it will throw that error.
i really appreciate you guys helping me out
If my answer was what you needed, accept it so the question appears answered any nobody else posts one
This discussion is preserved as it was. New answers, comments, and votes are closed.
15 comments
First do :FindFirstChild("Torso").
i will try
it did not work maybe i don't understand what you mean sorry i new at the scripting things
If your name isn't Capitalized in game then don't Capitalize it in the script, all Coding is Caps Sensitive. Try game.Workspace:WaitForChild("abrobot").Torso.Velocity.magnitude
Infinite yield possible on 'Workspace:WaitForChild("abrobot")'
try local abrobot = game.Workspace:WaitForChild("abrobot"), if abrobot.Torso.Velocity.magnitude > 0 then print(324) else print("Velocity.magnitude Is not greater than 0") end
oh do you know why there is a -5 by my name
thx for all your help im just starting to try to script and im not that good i appreciate your help
oh it did not work
Np, It's in the negatives if someone down votes your thread or answer, it takes away a certain amount of points even if you started with 0.
Can you show more of the script because i can't really help any more than that if i can't see what might be interfering.
thats it thats all the script
see im trying to test something and i want my guy to be anchored when his velocity is at 0 after he jumps
Well to do that it's a lot more complex, Velocity won't detect if Player is jumping. You would need to use UserInputService and you would need to learn a lot more Roblox Lua to be decent at at least trying to figure out how to do it. Later today i can try to help you.
kenUSM thx for your help and im getting off now but i will be on tomorrow and i sent you a friend request on roblox but itis still Infinite yield possible on 'Players:WaitForChild("abrobot")'