I use 2 local scripts : 1 for the move and 1 for the light :
local signs = workspace.Signs
local FromCityToBorder_SIGN = signs.FromCityToBorder
local function updatePart(part)
part.Material = Enum.Material.Neon
for i = 0.8, 0, -0.1 do
part.Transparency = i
task.wait(0.05)
end
task.wait(0.2)
part.Material = Enum.Material.ForceField
end
while task.wait(1) do
for i = 1, 3, 1 do
updatePart(FromCityToBorder_SIGN:FindFirstChild("Base"..tostring(i)))
end
updatePart(FromCityToBorder_SIGN:FindFirstChild("Arrow_Sign"))
end
local signs = workspace.Signs
local FromCityToBorder_SIGN = signs.FromCityToBorder
local function moveslowly(model, newModelPos)
local old_y = model.PrimaryPart.CFrame.Y
for i = model.PrimaryPart.CFrame.Y, newModelPos, 0.01 do
model:SetPrimaryPartCFrame(CFrame.new(model.PrimaryPart.CFrame.X, i, model.PrimaryPart.CFrame.Z) * CFrame.Angles(0, math.rad(90), 0))
task.wait(0.01)
end
for i = model.PrimaryPart.CFrame.Y, old_y, -0.01 do
model:SetPrimaryPartCFrame(CFrame.new(model.PrimaryPart.CFrame.X, i, model.PrimaryPart.CFrame.Z) * CFrame.Angles(0, math.rad(90), 0))
task.wait(0.01)
end
end
while task.wait() do
moveslowly(FromCityToBorder_SIGN, FromCityToBorder_SIGN.Step2.CFrame.Y)
moveslowly(FromCityToBorder_SIGN, FromCityToBorder_SIGN.Step3.CFrame.Y)
end
I Recommend that you swap out :GetPrimaryPartCFrame() and :SetPrimaryPartCFrame() with :GetPivot() and :PivotTo(), :GetPrimaryPartCFrame() and :SetPrimaryPartCFrame() have been deprecated for a while now, and was superceded by :GetPivot() and PivotTo()
One thing you can do is use math.sin() to have the Platform move more smoothly on the Y axis, Its recommended that you use something like tick(), os.time() or os.clock() (i will refer to these as time) to keep the Object Constantly Moving, you can edit the speed of time, Divide it to make it slower, or Multiply it to make it faster, Here is Example Code of what I mean:
local baseCFrame = object:GetPivot() -- The Normal CFrame of the Object so we can Reference it later
local speedModifier = 1 -- the Speed Modifier for our Object
while task.wait() do -- I recommend that you use RunService Instead, as it may be more efficient
local currentTime = os.clock()*speedModifier -- the time influenced by the speed modifier
object:PivotTo(baseCFrame * CFrame.new(0, math.sin(currentTime), 0)) -- Moves the Object using BaseCFrame plus Modified time
-- you can also Modify how far it goes up and down by multiplying math.sin
end
local signs = workspace.Signs
local FromCityToBorder_SIGN = signs.FromCityToBorder
local FromCityToBorder_ANIM = script.FromCityToBorder
while task.wait(0.36) do
local controller = FromCityToBorder_SIGN:FindFirstChild("AnimationController"):FindFirstChild("Animator")
local anim = controller:LoadAnimation(FromCityToBorder_ANIM)
anim:Play()
end
local FromCityToBorder_SIGN = script.Parent
local FromCityToBorder_ANIM = script.FromCityToBorder
while task.wait(0.36) do
local controller = FromCityToBorder_SIGN.AnimationController.Animator
local anim = controller:LoadAnimation(FromCityToBorder_ANIM)
print(anim.IsPlaying)
anim:Play()
print(anim.IsPlaying)
end