So, I made this script to move a ImageLabel around up, down, left or right on what the player says. But what happens is that it moves the GUI up by -0.1 no matter if the player says "W", "A", "S" or "D" or even anything else like "Hi" or anything.... Help me please? I try changing stuff and the output says nothing but I can't fix it... :c
function Move(msg)
if msg == "w" or "W" then
script.Parent.Position = script.Parent.Position + (UDim2.new (0, 0, -0.1, 0))
elseif msg == "a" or "A" then
script.Parent.Position = script.Parent.Position + (UDim2.new (-0.1, 0, 0, 0))
elseif msg == "s" or "S" then
script.Parent.Position = script.Parent.Position + (UDim2.new (0, 0, 0.1, 0))
elseif msg == "d" or "D" then
script.Parent.Position = script.Parent.Position + (UDim2.new (0.1, 0, 0, 0))
end
end
script.Parent.Parent.Parent.Parent.Chatted:connect(Move)

1 comment
UPDATED, I accidentally pressed post before I was done, so I had to edit it! Sorry!