Creating arrows for obby stages

You need to change the billboard gui’s adornee to the next spawn point when you touch the first one. For example:

local Player = game.Players.LocalPlayer
local Arrow = Player.PlayerGui.BillboardGui.ImageLabel
local FirstSpawn = game.Workspace.Spawns.Spawn1
local SecondSpawn = game.Workspace.Spawns.Spawn2

FirstSpawn.Touched:Connect(function(Hit)
if hit.Parent.Name = Player.Name then
Arrow.Adornee = SecondSpawn
end
end)

I would give the player a Intvalue that keeps track of their level, and whenever they touch a spawn it goes up to the next level. In which case this is what I would do to change the arrow to the next spawn.

local Player = game.Players.LocalPlayer
local Arrow = Player.Playergui.BillboardGui.ImageButton
local PlayerLevel = Instance.new("IntValue", Player)
PlayerLevel.Name = "Level"

for _, spawn in pairs(game.Workspace.Spawns:GetChildren()) do

spawn.Touched:Connect(function(hit)
if hit.Parent.Name = Player.Name then
     PlayerLevel.Value = PlayerLevel.Value + 1
    Arrow.Adornee = game.Workspace.Spawns:FindFirstChild("Spawn"..PlayerLevel.Value)
end
end)

end

This will only work if you make a folder named “Spawns” in workspace, and name all the spawns “Spawn1” and “Spawn2” and so on. You also need to put a billboardgui in StarterGui, and put an image button in the billboardgui.

4 Likes

Make an arrow (Not an image/gui and yes an object)

Then try this

local Arrow = game.Workspace.ArrowName--Change ArrowName,to the name of the model/union of the Arrow
--If you want,you can make an variable of the checkpoint

script.Parent.Touched:connect(function(hit)  
    local Character = hit.Parent
    if Character.Name = game.Players:GetPlayerFromCharacter(Character) then 
        Arrow.Position = Cframe.New(game.Workspace.Checkpoint1.Position) + Vector3.new(0,2,0)--Change 2 to the number of studs you want the Arrow to be above the checkpoint
else
    return
    end
end)
--Change 2 to the amount of studs you want the arrow to be

Note:You will probably need to put this script in every checkpoint.Also,dont forget to change the "Checkpoint1"name,to the name of the next checkpoint.

I’am not sure if this code will work,but i hope it does

1 Like

I Made Something like this but its not automatic version

local arrow = game.Workspace.Arrow

local Service = game:GetService("TweenService")

local Info = TweenInfo.new(

1, -- Length

Enum.EasingStyle.Quad, -- Easing style of the TweenInfo

Enum.EasingDirection.Out, -- Easing direction of the TweenInfo

1, -- Number of times the tween will repeat

false, -- Should the tween repeat?

0.5 -- Delay between each tween

)

local Loop = false

local Anim = {Position = game.Workspace.Checkpoint2.Position + Vector3.new(0, 10, 0)}

local Tween = Service:Create(arrow,Info,Anim)

script.Parent.Touched:Connect(function()

Tween:Play(0.5)

script.Disabled = true

end)
5 Likes