The value is false and it is still displaying “Equip” HELP PLEASE!
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Down:Connect(function()
print("fire")
game.ReplicatedStorage.SwordEvents.Future:FireServer(player)
end)
task.wait(1)
while task.wait() do
if player.Leaderstats.Swords.FutureSword == false then
script.Parent.Text = "Buy"
else
if player.Leaderstats.Swords.Sword.Value == 2 then
script.Parent.Text = "Equipped"
else
script.Parent.Text = "Equip"
end
end
end
I think you might be getting values confused, You are trying to see if the instance is true, but you are supposed to see if the value of the instance is true, try this instead.
while task.wait() do
if player.Leaderstats.Swords.FutureSword.Value == false then
script.Parent.Text = "Buy"
else
if player.Leaderstats.Swords.Sword.Value == 2 then
script.Parent.Text = "Equipped"
else
script.Parent.Text = "Equip"
end
end
end