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 5 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

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

the script for going up and down

01local bv = script.Parent
02 
03while true do
04    wait(1.5)
05bv.Velocity = Vector3.new(0,2)
06wait(1.5)
07bv.Velocity = Vector3.new(0,-2,0)
08spawn(function()
09    while script.Parent.KeepOrt == true do
10        wait(.1)
11        script.Parent.Parent.Orientation = Vector3.new(1.3, -36.65, -88.26)
12    end
13        end)
14end

1 answer

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

Use CFrame, For Example

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

Answer this question