Hello, I need a part to follow the player's torso with absolutely no lag. I have tried BodyPosition, but I need it to constantly follow where the player is, so I have to reset the position in a loop with a 0.01 interval, but I don't think Roblox can handle that interval... so how do I make it follow the player where it is without lag? Also, I there any other method that isn't welding, because I need to rotate the arms also.
The following script uses rocket propulsion to fire a projectile that follows the player by using brick welded above the player as a target. Keep in mind you might have to change the MaxSpeed and MaxThrust values of the rocket depending on the outcome you want and the weight of the part.
01 | local p = Instance.new( "Part" ) |
02 | p.FormFactor = "Custom" |
03 | p.BottomSurface = "Smooth" |
04 | p.TopSurface = "Smooth" |
05 | p.Size = Vector 3. new( 3 , 3 , 3 ) |
06 | local c = Instance.new( "RocketPropulsion" ,p) |
07 | c.Name = "rocket" |
08 |
09 |
10 |
11 | game.Players.PlayerAdded:connect( function (player) |
12 | player.Character:connect( function (character) |
13 | local u = p:Clone() |
14 | u.Size = Vector 3. new( 0 , 0 , 0 ) |
15 | u.Cancollide = false |
01 | local plr = game.Players.LocalPlayer |
02 | local char = plr.Character or plr:CharacterAdded:wait() |
03 |
04 | while wait() do |
05 | local part = script.Parent |
06 | local t = char.Torso |
07 |
08 | part.Position = t.Position |
09 |
10 | end ) |