Hello. I’m trying to make my barrier go up and down but it just moves the whole barrier instead of like just moving it up. As you can see in the video it goes back and fourth quite weirdly unlike an actual barrier.
Script:
local prox = script.Parent.ProximityPrompt
local enabled = false
local armUp = game.Workspace.Map.EntranceGate.ArmUp
local arm = game.Workspace.Map.EntranceGate.Arm
local armDown = game.Workspace.Map.EntranceGate.ArmDown
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false
)
prox.Triggered:Connect(function(plr)
if plr:GetRankInGroup(35020333) >= 9 then
if enabled == false then
local tweenArm = tweenService:Create(arm, info, {CFrame = armUp.CFrame})
tweenArm:Play()
end
end
end)
Video:
robloxapp-20250103-0025469.wmv (997.2 KB)