Why is the player underlined in red?

Why is the player underlined in red, what can it be replaced with? How to solve it?

game.ReplicatedStorage.SkinClassic.OnServerEvent:Connect(function(player, skinID)
	local sword = player.Backpack:FindFirstChild("Sword") or player.Character:FindFirstChild("Sword")
	if player.leaderstats.Coins.Value >= 100 and player.korzina.Classic.Value == 0 then
		sword.Handle.Mesh.TextureId = skinID
		player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - 100
		player.korzina.Classic.Value = 1
	end
	if player.korzina.Classic.Value == 1 then
		sword.Handle.Mesh.TextureId = skinID
		player.korzina.Classic.Value = 2
		if player.korzina.Gold.Value == 2
			player.korzina.Gold.Value = 1
		end
		if player.korzina.Death.Value == 2
			player.korzina.Death.Value = 1
		end
	end
	
end)

you forgot the Then in the if statement.

1 Like
game.ReplicatedStorage.SkinClassic.OnServerEvent:Connect(function(player, skinID)
	local sword = player.Backpack:FindFirstChild("Sword") or player.Character:FindFirstChild("Sword")
	if player.leaderstats.Coins.Value >= 100 and player.korzina.Classic.Value == 0 then
		sword.Handle.Mesh.TextureId = skinID
		player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - 100
		player.korzina.Classic.Value = 1
	end
	if player.korzina.Classic.Value == 1 then
		sword.Handle.Mesh.TextureId = skinID
		player.korzina.Classic.Value = 2
		if player.korzina.Gold.Value == 2 then
			player.korzina.Gold.Value = 1
		end
		if player.korzina.Death.Value == 2 then
			player.korzina.Death.Value = 1
		end
	end
	
end)

[/quote]

And thanks, I’ve been thinking for about 30 minutes that I forgot.

2 Likes

pretty funny mistake, you forgot a then

1 Like

why do you have to torture yourself with light mode?

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