This simple if/then statement isn't working. It also doesn't print any errors. I can't figure out what's wrong with it
local Event = game.ReplicatedStorage.Tools.GiveGun local Gun = game.ServerStorage.Tools.Gun Event.OnServerEvent:Connect(function(Player) if Player.Stats.Gun.Value == false then print("Gun isn't unlocked.") end end)
In Lua, if a value is not false or nil, it’s considered “true” when used in a conditional statement. https://developer.roblox.com/en-us/articles/Boolean