generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Humanoid State Help

Previous Thread :: Next Thread 
lopsidedmail is not online. lopsidedmail
Joined: 29 Oct 2011
Total Posts: 253
10 Feb 2017 10:28 PM
Being that no one REALLY tried to help me with this I'm re-posting but with more information.

I'm trying to have the player start terrain water swimming w/o the terrain water. There are a few functions in the humanoid that I'm trying to figure out...

bool GetStateEnabled (
HumanoidStateType state
)

and

void SetStateEnabled (
HumanoidStateType state,
bool enabled
)

This is how my script works:

wait(1) --Letting some things load
while wait() do
local plr = game.Players.LocalPlayer
repeat wait() until game.Workspace:FindFirstChild(plr.Name)
local char = plr.Character
local Human = char:WaitForChild("Humanoid")
Human:ChangeState(Enum.HumanoidStateType.Swimming)
Human.AutoJumpEnabled = false
local S = Human:GetState()
print(S)
end
All I want to do atm is to have the player swim.

The problem:

The player DOES enter the state for swimming but it only lasts a fraction of a second being that the player's state is constantly changing from moving to falling etc... That's why I'm trying to find out how the GetStateEnabled and SetStateEnabled can be activated and deactivated.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image