Dumbest bug ive seen yet

alright so i was trying to achieve a debounce affect with this “vomit” ability, so it couldnt be spammed, but then my debounce (boolean) just doesnt index??

ive tried reading the docs but i did basically what it said .Changed was used for, and it still hit me with the bug.

error message:
Workspace.LMsees.Detect If Vomit:33: attempt to index boolean with ‘Changed’

script (client)

uis = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
debounce = Instance.new("BoolValue")
debounce = true
ingame = false

game.ReplicatedStorage.Going_In.OnClientEvent:Connect(function()
	print("we are SO in rn")
	ingame = true
end)

game.ReplicatedStorage.Death.OnClientEvent:Connect(function()
	print("rest in peace")
	ingame = false
end)


uis.InputBegan:Connect(function(input)
	print(debounce)
	print(ingame)
	if input.KeyCode == Enum.KeyCode.E and debounce == true and ingame == true then
		debounce = false
		wait(0.05)
		print(debounce)
		game.ReplicatedStorage.Vomit:FireServer()
		print("sent")
		wait(3)
		debounce = true
	end
end)

--broken part here

debounce.Changed:Connect(function()
	if debounce == true then
		wait(3)
		if debounce == true then
			debounce = false
		end
	end
end)
1 Like

You probably meant deblunce.Vale = true above

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.