Attempt to index boolean with 'Name'

attempt to index boolean with ‘Name’

Here is my code

local Players = game:GetService("Players")

local function PlayerAdded(Player)
	local debouce = Instance.new("BoolValue")
	debouce = false
	debouce.Name = "Debounce"
	debouce.Parent = Player
end

Players.PlayerAdded:Connect(PlayerAdded)

I am not sure why I am getting this error. This has never happened to me before. Anything helps!

1 Like
local Players = game:GetService("Players")

local function PlayerAdded(Player)
	local debouce = Instance.new("BoolValue")
	debouce.Value = false -- I guess you were missing .Value
	debouce.Name = "Debounce"
	debouce.Parent = Player
end

Players.PlayerAdded:Connect(PlayerAdded)

Thank you I feel so dumb.
(30 needed)

1 Like

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