Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is does :Changestat mean when defining a function?

Asked by 3 years ago
function PlayerStatManager:ChangeStat(player, statName, value)
--code
end

What does the :Changestat mean?

0
I am simply confused by the fact that it uses ":" since those are normally associated with :connect(function()) and similar. AndriusTheGreat 140 — 3y
0
I will remember to accept a helpful answer AndriusTheGreat 140 — 3y
1
The colon is just meant that it's a function like :GetChildren. R4nd0ml0l2 105 — 3y
1
Also, can you understand the roblox wiki for it? R4nd0ml0l2 105 — 3y
View all comments (5 more)
0
Thanks, but I couldn't find anything specific about :changestat , whereas other functions have a dedicated page. Furthermore I am really confused about what the purpose of this function is. AndriusTheGreat 140 — 3y
1
Ok, I will try my best to describe what it is. R4nd0ml0l2 105 — 3y
0
On a related note would it be possible to use '' function PlayerStatManager(player, statName, value) end '' Or am I required to use this specific function? AndriusTheGreat 140 — 3y
1
I never used this function since it's not really a necessary one, maybe I'm wrong. R4nd0ml0l2 105 — 3y
0
Ok, thanks for the help :) AndriusTheGreat 140 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago

Humanoid:ChangeState()

Humanoid:ChangeState() is a function which describes the information of the humanoids status. This function is used for "Humanoid". You will barely use this function, since it automatically changes what the humanoid is actually doing like: The humanoid is walking but you give it's changed status to "climbing", however it would update what the player is actually doing, in this case changing from "climbing" into walking, since the player is walking, not climbing. :ChangeState() has one parameter, called state. It performances what status of humanoid will get changed to. More informations which I recommend is this link

I am bad at describing, so I would understand my description about it isn't the best of all. Whatsoever, have a good day.

1
I liked you description but my question was about the :Changestat function and not about :Changestate. The place where it is used includes a short description, however I have a hard time understanding it. Here's the link: https://developer.roblox.com/en-us/articles/Saving-Player-Data Nevertheless I will still accept your answer and hope you have a nice day too :) AndriusTheGreat 140 — 3y
1
I read it wrong for some reason. Atleast you learned about another function too! R4nd0ml0l2 105 — 3y
1
Yes, now I know what to use if I want the player to go into rag doll mode. AndriusTheGreat 140 — 3y
1
Oh, so there's two different categories. I will quickly look it up. AndriusTheGreat 140 — 3y
View all comments (2 more)
0
Thanks for the help. :D AndriusTheGreat 140 — 3y
1
No problem :) R4nd0ml0l2 105 — 3y
Ad

Answer this question