I'm working on a game. What did I do wrong with the leaderstats?
Players.Player1.PlayerGui.Menu1.MainMenu:115: attempt to compare number with userdata
local dagcount = 0
local function daggerclicked()
if player.leaderstats2.Level >= 5 then
dagcount = dagcount + 1
if dagcount == 1 then
dagger.Text = "Dagger: Owned"
elseif dagcount == 2 then
dagger.Text = "Dagger: Equipped"
dagcount = 0
end
end
end

2 comments
Whats that first line?
I am very confused by the script here. I'm going to guess "leaderstats2" was a typo on line 4, and was supposed to be leaderstats?