For some reason the LocalScript is not running. I presume it's because of the functions I used, but I eagerly want to make this script work. For a valid reason.
Please note that "Orange Text" is an ImageLabel , "OrangeTextLabelHitValue" is an
IntValue that tells when the "Orange Text" ImageLabel is supposed to move. ControlFrame is just an ordinary Frame
Structure
-Frame
~~OrangeTextHitValue
~~ControlGui <-- This is where the LocalScript I'm talking about is located.**
~~OrangeText
local ControlFrame = script.Parent
local OrangeTextLabel = ControlFrame:WaitForChild("OrangeText")
local ControlTrigger = ControlFrame:WaitForChild("OrangeTextHitValue").Value
ControlTrigger.Changed:Connect(function()
if ControlTrigger == 1 then
ControlFrame.Position = UDim2.new(0,0,0,0)
OrangeTextLabel.Position = UDim2.new(0,0,0,0)
end
end)
ControlTrigger.Changed:Connect(function()
if ControlTrigger == 2 then
ControlFrame.Position = UDim2.new(0,0,55,0)
OrangeTextLabel.Position = UDim2.new(0,0,-55,0)
end
end)
ControlTrigger.Changed:Connect(function()
if ControlTrigger == 3 then
ControlFrame.Position = UDim2.new(0,0,110,0)
OrangeTextLabel.Position = UDim2.new(0,0,-110,0)
end
end)
ControlTrigger.Changed:Connect(function()
if ControlTrigger == 4 then
ControlFrame.Position = UDim2.new(0,0,165,0)
OrangeTextLabel.Position = UDim2.new(0,0,-165,0)
end
end)
ControlTrigger.Changed:Connect(function()
if ControlTrigger == 4 then
ControlFrame.Position = UDim2.new(0,0,220,0)
OrangeTextLabel.Position = UDim2.new(0,0,-220,0)
end
end)
