Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Can I Create an Arrow Under The Player's Feet?

Asked by 5 years ago

I've been trying to make an arrow that points towards where a certain item is and sits on the ground. However, the way I'm using doesn't work for 2 reasons:

1) It doesn't rotate 2) It seems to be uneven as it's parented to the LowerTorso.

Here's the code I wrote:

local SS = game:GetService("ServerStorage")
local QA = SS.QuestArrow

game.Players.PlayerAdded:connect(function(player)
    local qa2 = QA:Clone()
    repeat wait() until player.Character ~= nil
    qa2.Parent = player.Character
    qa2.Rotation = player.Character.LowerTorso.Rotation
    local weld = Instance.new("Weld", qa2)
    weld.Part0 = qa2 
    weld.Part1 = player.Character["LowerTorso"] 
    weld.C0 = CFrame.new(0, 1.75, 0)
end)

I'm still relatively new to using CFrame for anything other than teleporting and very new to welding.

Any pointers or recommendations would be much appreciated! (please note i'm not asking for someone to make the script or me, merely point me in the right direction or help me w/ the code i've already written)

0
I'd recommend using a GUI or an Mesh for the arrow. LennonLight 95 — 5y
0
If you want the arrow to show up every time they spawn, I would recommend using Player.CharacterAdded:Connect(function(char) [put code here] end) inside the PlayerAdded event. The wait you currently have will only have the code run the first time they spawn in. MadWorlds 84 — 5y
0
the spawn thing was just so i could test it BouncingBrenda 44 — 5y

Answer this question