I'm trying to make this thing that when the player is jumping, they will be able to press space again to transform their character. Is there anything wrong with my script? the transform part is working, it's just when the player is jumping and is pressing the spacebar again.
if Humanoid.Jump == true then
game:GetService("UserInputService").InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.Space then
for _, child in pairs(script.Parent:GetChildren()) do
is_transformed = true
if child:IsA("UnionOperation") then
child.CanCollide = false
child.Transparency = 1
Animator.Parent = nil
Humanoid.HipHeight = 1
end
end
end
end)
end

7 comments
Explain dude.
It's not working because it's not indented properly
the indention is wrong. for sure.
If the player is jumping, they will be able to press space, how do I do that?
Also, indentation is optional, I don't really mind about it
well ur dumb then. roblox automatically indents by default, so its more work not to do it at all
I'm just a beginner, I add my function 1 by 1 to add new stuff that I learnt