Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a Text Label go down 0.05 when one is placed already?

Asked by 5 years ago
Edited 5 years ago

I'm stuck on this and currently need help solving it.

I don't know if I'm doing it right.

Code I have so far :

List = script.Parent
Command = script.Command:Clone()
function AddCmd(Label,cmdname,parent)
    local cmdname = Label.Text
    local Pos = script.Pos
    local parent = Label.Parent
    local CurrenPos = script.CP
    CurrenPos.Value = tostring(Label.Position.Y)
    Pos.Value = Label.Position.Y
    wait()
    Label.Position = UDim2.new(0.02, 0,0.2 , 0) 
end
AddCmd(Command,'1. kill [plr]',List)

I'm making a command list, and I want to make it where if I add a command later on, it moves down from the latest TextLabel showing a command, but down by 0.05

Any help

(making it a function is easier for me in my opinion)

1 answer

Log in to vote
0
Answered by
WoTrox 345 Moderation Voter
5 years ago

Something like Pos.Y = Pos.Y + 0.05 will do it, I think. But i don't know that Command.Pos or Command.Position is better. Try both

0
Unfortunately that didn't work well ;( AmokahTheFox 30 — 5y
Ad

Answer this question