Trying to make arrow go up and down

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    trying to make an arrow go up and down (btw its a union)
  2. What is the issue? Include screenshots / videos if possible!
    it goes so far down that every time i go near it the void kills me so basically its beneath the void and i cant get it
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    this is what i’ve tried so far:
    while true do

wait(0.5)

local par = script.Parent

for i=1, 100 do

par.CFrame = par.CFrame * CFrame.new(2.52, 6.215, 20.286)

wait()

end

wait()

for i=1, 100 do

par.CFrame = par.CFrame * CFrame.new(-2.44, 3.285, 21.61)

wait()

end

end

please help :sad:

Next time try putting code in between ticks like this:

Using triple ` marks before and after your code makes it appears like this.

For this, I’d recommend an infinitely looping tween in which you tween the CFrame of the arrow between the two desired values.

1 Like
local TweenService=game:GetService("TweenService")
local par = script.Parent

local goal = {}
goal.Position = Vector3.new(23.6, 100.5, 193.7) --Set the position of the goal of your part

local tweenInfo = TweenInfo.new(5,0,0,-1,true,0) --Do some research on tweens to understand all this
local tween = TweenService:Create(par, tweenInfo, goal)
tween:Play()
3 Likes