Hello there everyone, I'm trying to switch a gui whenever a value is different and it works fully! Except that it doesn't wanna change the text, doesn't set the correct position and doesn't want to tween. Can anyone help me? Ty!
(picture of my explorer) https://i.imgur.com/oG0TjW6.png
mvn = script.Parent.Parent.Parent.Parent.Parent.Parent.VehicleSeat
sensor = script.Parent.Parent.Parent.Parent.Parent.Parent.Destination.stopped
while true do
wait(1)
if sensor.Value == true then
script.Parent.Parent.Visible = true
script.Parent.Parent.Parent.Frame1.Visible = false
script.Parent.Text = "Mind the gap between the train and platform!"
script.Parent.Position = UDim2.new(0, 400, 0, 0)
script.Parent:TweenPosition(UDim2.new(0, -700, 0, 0), "Out", "Linear", 7)
wait(11)
script.Parent.Text = "Welcome onboard AT' trains!"
script.Parent.Position = UDim2.new(0, 400, 0, 0)
script.Parent:TweenPosition(UDim2.new(0, -700, 0, 0), "Out", "Linear", 7)
wait(13)
script.Parent.Text = "Doors closing, please stand clear!"
script.Parent.Position = UDim2.new(0, 400, 0, 0)
script.Parent:TweenPosition(UDim2.new(0, -700, 0, 0), "Out", "Linear", 7)
wait(11)
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.Frame1.Visible = true
end
end
