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

I'm trying to make a kamehameha script but it won't detect that i equipped the tool.How?

I have tried print as you can see in my script below but it just doesn't recognize that i'm equipping the tool.

function startkame()
startkame = Instance.new("Part")
startkame.Shape = 'Ball'
startkame.Material = 'Neon'
startkame.Name = 'StartKame'
startkame.BrickColor = BrickColor.new("Toothpaste")
startkame.CFrame = plr.Cframe
print('starting')
end
print('startkame is fine')

--launching
function launch()
	
end
print ('launch is fine')
  hax = false
 tool = script.Parent
charge = Instance.new("Animation")
charge.AnimationId = "https://www.roblox.com/asset/id?=".."02561050525"
debounce = false
toggle = false
plr = script.Parent.Parent.Parent
ctr = plr.Character or plr.CharacterAdded:Wait()
m = plr:GetMouse()
hum = ctr:WaitForChild('Humanoid')
Equipped = false
chargetrack = ctr:WaitForChild("Humanoid"):LoadAnimation(charge)
print ('variables are fine')
tool.Equipped:Connect(function(lol)
	m = plr:GetMouse()
	print('Equipped')
	Equipped = true
	m.Icon = 'rbxgameasset://Images/'..'Gun Aim'
	end)
m.Button1Down:Connect(function()
	print('clicked')
    if debounce == false and Equipped then
        if toggle == false then
				hax = true
				function startkame()
                debounce = true
                toggle = true
				end
end
end
end)
m.Button1Up:Connect(function()
	print('released')
    if toggle == true then
        toggle = false
		function launch()
		print("Launched")
		    end
end
end)
tool.Unequipped:Connect(function()
	print('Unequipped')
	m.Icon = 'rbxassetid://'..'61210994'
	Equipped = false
	if hax and toggle then
		toggle = false
		function startkame()
		debounce = true
		wait(5)
		debounce = false
		hax = false
		toggle = false
		m = nil	
		end
	end
	end)

also I'm making a kamehameha script so i might ask more questions about this.

1 answer

If it's not detecting events then RequiresHandle could be set to false on the tool. If RequiresHandle is enabled then the tool needs a handle. Try setting RequiresHandle to false if you don't have a handle. If this didn't work please post any errors if there is any.

2 comments

0

well duh

0

no errors in output requireshandle is already false

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