Saying the wrong thing

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 dont get what FutureSword is, is it an instance? value? or something else?

1 Like

It is a bool value.
Charssssssssss

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
2 Likes

ah ya i missed the .Value
thanks

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