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

trying to make swords float and follow the player i tried Vector but it dons't work how do i fix?

Asked by 4 years ago

i'm trying to make swords float up and down while they are flowing to player but it dons't work, i mean it does but when it updates it does not go up and down.

the script for following

local sword = script.Parent
local Unkown = script.Parent.Parent --------- player's arm
while true do
    wait(.2)
    sword.Position = Unkown.Position + Vector3.new(-3,0,0)
end


the script for going up and down

local bv = script.Parent

while true do
    wait(1.5)
bv.Velocity = Vector3.new(0,2)
wait(1.5)
bv.Velocity = Vector3.new(0,-2,0)
spawn(function()
    while script.Parent.KeepOrt == true do
        wait(.1)
        script.Parent.Parent.Orientation = Vector3.new(1.3, -36.65, -88.26)
    end
        end)
end

1 answer

Log in to vote
0
Answered by
Shubu13 29
4 years ago
Edited 4 years ago

Use CFrame, For Example

local sword = script.Parent
local Unkown = script.Parent.Parent --------- player's arm
while true do
    wait(.2)
    sword.CFrame= Unkown.CFrame + CFrame.new(-3,0,0)
end
Ad

Answer this question