-
What do you want to achieve?
I want my character to only sprint when a value in the character is true. so if the value is
false the character wont sprint. -
What is the issue?
The problem is that my sprint script cant detect if the boolvalue is true or false -
What solutions have you tried so far?
I have tried changing the boolvalue’s name and parent and looking for similar problems
in the dev forum
here is the part of my sprint script that doesnt work
Input.InputBegan:Connect(function(input,pro)
if (input.KeyCode == Sprint) and (not pro) and (not Crouching) and CanSprintzyeah == true then -- cant detect
Sprinting = true
jitzsprintin.Value = true
SetSpeed(false,SprintSpeed,SprintJump)
elseif (input.KeyCode == Crouch) and (not pro) and (not Sprinting) and CanCrouchzyeah == true then -- cant detect
jitzcrouchin = true
Crouching = true
hum.HipHeight = -1.3
SetSpeed(false,CrouchSpeed,CrouchJump)
end
end)
Input.InputEnded:Connect(function(input,pro)
if (input.KeyCode == Sprint) and (not Crouching) and CanSprintzyeah == true then -- cant detect
Sprinting = false
jitzsprintin.Value = false
SetSpeed(true)
elseif (input.KeyCode == Crouch) and (not Sprinting) and CanCrouchzyeah == true then -- cant detect
jitzcrouchin = false
Crouching = false
hum.HipHeight = 0
SetSpeed(true)
end
end)