Hello. I am making this script where you have to be a certain rank in the group to make the code work. It works however, I can't find where to put the else.
Because I want to make it so if you try and click it and you are not that rank, it says that. When I try to put else, it usually breaks it. If you could help that would be great.
Just to be clear, I want the full script to run if the player is ranked appropriately in the group but if they are not, for example, let's say it would JUST run "last.Text = "You do not own this.""
local player = game.Players.LocalPlayer
local classes = script.Parent.Parent.Parent.Parent.Classes
local last = script.Parent.Parent.Parent.Parent.End
script.Parent.MouseButton1Click:connect(function()
if player:GetRankInGroup(2696060) == 5 then
classes:TweenPosition(UDim2.new(0.99, 0,0.116, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.7, false, function()
wait(1.3)
last:TweenPosition(UDim2.new(0.131, 0, 0.116, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.7, false, function()
game.ReplicatedStorage:FindFirstChild('Eco')
if game.ReplicatedStorage:FindFirstChild('Eco') then
game.ReplicatedStorage.Eco:Clone().Parent = player.Backpack
end
end)
end)
end
end)
