Help disabling sprinting while crawling

Is the sprinting script and crouch script two different scripts?

Edit: Appears that way. The issue here is that the scripts aren’t communicating with each other, you can locally update a BoolValue Instance and have the scripts check the value of that.

Sorry to ask but how do I do this? Sorry I’m not that smart at this stuff

Create BoolValue Instance somewhere in the explorer and have the scripts access it.

example

--// getting and checking a boolvalue value
local boolValue = workspace.BoolValue

if boolValue.Value then
   -- value is true
else
  -- value is false
end

--// setting a boolvalue value
boolValue.Value = true or false

Do I make a new script and put it in?

Bro I don’t get this at all ima take a break even tho I Dident do anything and u did all the hard work see u later

Actually ima try rn ima try to do what u said so do I put it into a different script?

Like where do I put the script under

I know for a fact I am the most stupid person u ever helped

You place it in both scripts but not the exact thing I put (it’s just an example). I don’t tend to explain things thoroughly (as I can confuse people), so I may just link some DeveloperHub articles that may help you:


You’re not. Don’t be too hard on yourself, you’re still learning.

I thought fixing this bug was simple but nope I was wrong this takes for ever for me

What link would help me the most for this cuz I need this done pls

If you merge the two scripts together then the first, fourth, and fifth links would be of help

Why can’t I just put in the script like if crawlAnim= true then IsSprinting = false

Or will that not work? Idk what to do the thing u told me I don’t get at all

Scripts have different environments, so one variable in a single script environment won’t be visible to another script environment.

Although, If you mean put that in the same script, then yea, do that

1 Like

Bro I officially gave up I tired for so long thank you for trying to help me tho ima just check u as for solution cuz u helped me for so long thanks for trying to help me tho