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

Equipped Function not working?

I was making a kamehameha tool but I it doesn't print Equipped

tool.Equipped:Connect(function()
	Equipped = true
	print(Equipped)
	m.Icon = 'rbxgameasset://Images/'..'Gun Aim'
end)

If you know why then tell me.

You asked for it, the whole script

function startkame()
	if debounce == false and Equippe then
    	if toggle == false then
			print ('Passed')
			debounce = true
			toggle = true
			hax = true
			print('Will it play?')
			chargetrack:Play()
			print('PLAYED')
			startkame = Instance.new("Part")
			print("made")
			startkame.Shape = 'Ball'
			print('ball')
			startkame.Material = 'Neon'
			print('mat')
			startkame.Name = 'StartKame'
			print('Name')
			startkame.BrickColor = BrickColor.new("Toothpaste")
			print('color')
			startkame.CFrame = arm.CFrame
			print('CFrame')
			startkame.Size = Vector3.new(8, 8, 8)
			print('size')
			startkame.CanCollide = false
			startkame.Anchored = true
			print(ctr)
			startkame.Parent = ctr
			wait(1)
			blast()
			print('starting')
		end
	end
end

--launching
function blast()
	print('Blastoff')
	if toggle == true then
		print('toggle is true')
		toggle = false
		launch = Instance.new('Part', ctr)
		launch.Shape = 'Cylinder'
		launch.Size = Vector3.new(75, 5, 5)
		launch.CFrame = ctr.Torso.CFrame
		launch.BrickColor = BrickColor.new('Toothpaste')
		launch.Material = 'Neon'
		launch.CanCollide = false
		launch.Anchored = true
		launch.Orientation = ctr:FindFirstChild('Torso').CFrame.lookVector*3
		wait(3)
		ctr:WaitForChild('Humanoid').WalkSpeed = norm
		hum.JumpPower = norn
		startkame:Destroy()
		launch:Destroy()
		debounce = true
		hax = false	
	end
end
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')
norm = hum.WalkSpeed
norn = hum.JumpPower
Equippe = false
chargetrack = ctr:WaitForChild("Humanoid"):LoadAnimation(charge)
arm = ctr:FindFirstChild('Right Arm') or ctr:FindFirstChild('RightHand')
print ('variables are fine')

tool.Equipped:Connect(function()
	Equippe = true
	print('Equipped')
	m.Icon = 'rbxgameasset://Images/'..'Gun Aim'
end)

m.Button1Down:Connect(startkame)

m.Button1Up:Connect(function()
	print('released')
	if Equippe == true then
		blast()
	end
end)
tool.Unequipped:Connect(function()
	print('Unequipped')
	m.Icon = 'rbxassetid://'..'61210994'
	Equippe = false
	if hax and toggle then
		toggle = false
		startkame()
		debounce = true
		wait(5)
		debounce = false
		hax = false
		toggle = false
	end
end)

1 comment

0

I didn't put the whole script but if you need it i'll give you it

1 answer

✓ Accepted answer

It's a string so you do

print("Equipped")

10 comments

0

You're just printing it wrong, the script after the equipped function should work

0

k

0

still ain't working

0

what i was going for was a print true or print false

0

What does the output window say?

0

Equipped isn't a variable, it's an event so you can't just set it to true or false

0

nothing just my other prints

0

oh

0

either way the Equipped function isn't working

0

Are you sure it's the equipped function that's not working or the entire script itself because from the looks of it you're using a free model which often don't work.

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