You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
What is the issue? Include screenshots / videos if possible!
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- This is an example Lua code block
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
You could make a boolean value and check if the boolean value is true when the player presses the sprint key.
Just change the boolean value to true/false on the crawl script.
I just read the reply above me…
uis.InputBegan:Connect(function(input, proccess)
if input.KeyCode == Enum.KeyCode.LeftShift and not crouching then
-- 'crouching' would the boolean variable to check
-- code to sprint here
end
end)
You’re not.
In the function that makes the player crouch, you can do this when they enable it:
Actually, there’s another problem, don’t wrap the entire script under the UserInputService.InputBegan. What I meant by -- code to sprint here was to call the function that makes the player sprint, not the entire script.
Yea my wifi isn’t working I can still create just not save my game so ima write the scipy and send u a picture and can U tell me if it’s right? Also how do I send pics on mobile
Put the new event listener near the bottom of the script and remove the old one. The listener should look like this:
uis.InputBegan:Connect(function(input, processed)
if input.KeyCode == Enum.KeyCode.LeftShift and not crouching then
sprint("Began") -- lowercase 's' ; variable names are case-sensitive
end
end)