:TweenPosition instead of just Position?
Asked by
8 years ago Edited 8 years ago
02 | local ReplicatedStorage = game:GetService 'ReplicatedStorage' |
04 | local ply = script.Parent.Parent or game.Players.LocalPlayer |
05 | local Event = ReplicatedStorage.ChatEvent |
08 | local function TweenPushMessages(Size) |
09 | for i,v in pairs (Messages) do |
10 | v.Position = v.Position - UDim 2. new( 0 , 0 , 0 ,Size) |
14 | ply.Chatted:connect( function (msg) |
21 | Event.OnClientEvent:connect( function (ply,msg) |
22 | local MSG = script.Messages_:Clone() |
23 | MSG.Message.Text = msg |
24 | MSG.Message_Owner.Text = '[' ..ply.Name.. ']: ' |
25 | MSG.Parent = ply.PlayerGui.ChatGui.Frame |
26 | MSG.Message_Owner.TextColor 3 = ply.TeamColor.Color |
27 | TweenPushMessages(MSG.AbsoluteSize.Y) |
28 | Messages [ #Messages+ 1 ] = MSG |
The function TweenPushMessages is where I'm trying to do it, but I know it wouldn't work, would there be a way to recreate it with TweenPosition instead?