Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My Basketball Travel Script Isnt working Says couldnt find humanoid?

player = game.Players.LocalPlayer local tool = script.Parent local trav = tool:WaitForChild("Travel") local uis = game:GetService("UserInputService") local move = tool.Movement local other = tool.Other

--local module = require(tool.module) uis.InputBegan:Connect(function(K, chat) if equipped == true and not chat then if (K.KeyCode == Enum.KeyCode.Space) then --module.fix() if move.Disabled == false then trav:FireServer() end --[[elseif (K.KeyCode == Enum.KeyCode.Space) then --module.travel() if move.Disabled == false then trav:FireServer() end--]] end end end)

humanoid.Jumpping:Connect(function() if move.Disabled == false then trav:FireServer("Travel") end end)

tool.Equipped:Connect(function() equipped = true end)

tool.Unequipped:Connect(function() equipped = false end)

1 answer

Please make your code nicer I don't know what you wanted because it was really messy. Your code had "humanoid" without a variable that's why, and also you misspelled "Jumping" you had it as "Jumpping"

player = game.Players.LocalPlayer
local tool = script.Parent 
local trav = tool:WaitForChild("Travel") 
local uis = game:GetService("UserInputService") 
local move = tool.Movement 
local other = tool.Other
local humanoid = player.Character.Humanoid

--local module = require(tool.module)
uis.InputBegan:Connect(function(K, chat)
	if equipped == true and not chat then 
		if (K.KeyCode == Enum.KeyCode.Space) then --module.fix() 
			if move.Disabled == false then trav:FireServer() 
			end 
		end
	end
end)

humanoid.Jumping:Connect(function()
	if move.Disabled == false then 
		trav:FireServer("Travel")
	end
end)

tool.Equipped:Connect(function() equipped = true 
end)

tool.Unequipped:Connect(function() equipped = false 
end)

2 comments

0

Thank you

0

If it works please mark it as a solution :)

This discussion is preserved as it was. New answers, comments, and votes are closed.