So Basically I am doing a level up system with experience, and when you reach certain levels I want the image of your new rank to show and the Text Label at the top, but I don't know what to use. I have tried player added and on enter, but it just keeps replaying every time it happens, and I don't know what to use.
Here is the code I am using right now.
nov = script.Parent.Main.Novice
app = script.Parent.Main.Apprentice
mas = script.Parent.Main.Master
name = script.Parent.Main.Title
function onEnter()
if game.Players.LocalPlayer.Data.Level.Value == 2 then
script.Parent.RankUp:Play()
name:TweenPosition(UDim2.new(0.5, -200, 0, 0), "In", "Elastic", 0.1)
wait(0.001)
nov:TweenPosition(UDim2.new(0.5, -250, 0.5, -100), "In", "Quad", 0.3)
wait(1.5)
nov:TweenPosition(UDim2.new(-1, -250, 0.5, -100), "Out", "Quad", 0.3)
wait(0.001)
name:TweenPosition(UDim2.new(0.5, -200, -1, 0), "Out", "Quad", 0.1)
wait(0.05)
else
nov:TweenPosition(UDim2.new(-1, -250, 0.5, -100), "Out", "Quad", 0.3)
wait(0.05)
name:TweenPosition(UDim2.new(0.5, -200, -1, 0), "Out", "Quad", 0.1)
wait(0.05)
end
if game.Players.LocalPlayer.Data.Level.Value == 10 then
script.Parent.RankUp:Play()
name:TweenPosition(UDim2.new(0.5, -200, 0, 0), "Out", "Quad", 0.1)
wait(0.001)
mas:TweenPosition(UDim2.new(0.5, -250, 0.5, -100), "In", "Quad", 0.3)
wait(1.5)
mas:TweenPosition(UDim2.new(-1, -250, 0.5, -100), "Out", "Quad", 0.3)
wait(0.001)
name:TweenPosition(UDim2.new(0.5, -200, -1, 0), "Out", "Quad", 0.1)
wait(0.05)
else
mas:TweenPosition(UDim2.new(-1, -250, 0.5, -100), "Out", "Quad", 0.3)
wait(0.05)
name:TweenPosition(UDim2.new(0.5, -200, -1, 0), "Out", "Quad", 0.1)
wait(0.05)
end
if game.Players.LocalPlayer.Data.Level.Value == 20 then
script.Parent.RankUp:Play()
name:TweenPosition(UDim2.new(0.5, -200, 0, 0), "Out", "Quad", 0.1)
wait(0.001)
app:TweenPosition(UDim2.new(0.5, -250, 0.5, -100), "In", "Quad", 0.3)
wait(1.5)
app:TweenPosition(UDim2.new(-1, -250, 0.5, -100), "Out", "Quad", 0.3)
wait(0.001)
name:TweenPosition(UDim2.new(0.5, -200, -1, 0), "Out", "Quad", 0.1)
wait(0.05)
else
app:TweenPosition(UDim2.new(-1, -250, 0.5, -100), "Out", "Quad", 0.3)
wait(0.05)
name:TweenPosition(UDim2.new(0.5, -200, -1, 0), "Out", "Quad", 0.1)
wait(0.05)
end
end
script.Parent.Main.MouseEnter:connect(onEnter)
Thanks!
