Just tested this, the part teleports to my player, starts rapidly spinning, and wont follow me.
To add, i dont want it to teleport to the player, i want it to move 5 studs above the player.
TBH i like how it stays in one place though
Hello Bungar it’s important to be more clear in what you are trying to achieve. That said in your earlier post before this one, I have given you a more efficient solution. It doesn’t require using loops, and instead just requires inserting an attachment into your players root. To make it follow your player from above you can just change the position of the attachment in the players root and it will follow.
You have specified you want it to teleport to the player.
Please be specific in creating new topics as to help problem solvers figure out what you need help with.
Additionally, the Roblox DevForum is only a resource, and is not suit to develop entire scripts for you. Bug fixing and additional modifications are something you do yourself.
i said move to, as in move.
Just to add, when you move to a place IRL, do you teleport to it?
I have edited my scripts again. And I tested it; It works.
local object -- path to object
local runService = game:GetService("RunService")
local offset = CFrame.new(0,5,0) -- set this to anything you want
local alpha = 0.3 -- same with this one
local targetPlayer = game.Players:WaitForChild("AlaTomKing")
local character = targetPlayer.Character or targetPlayer.CharacterAdded:Wait()
local Head = character.Head
object.CFrame = (Head.CFrame * offset)
runService.Heartbeat:Connect(function()
--print(humanoidRootPart.CFrame * offset)
object.CFrame = object.CFrame:Lerp(Head.CFrame * offset, alpha)
end)
This is to be put in the ServerScriptService (or in the part as you have asked) and you may replace the Head with HumanoidRootPart to exclude the weird animation the object makes. But then you may need to increase the offset a bit to match “5 studs”.
like i said in my post (please read it)
Script must be in the part
Player must be able to be chosen (I see you have done that though.)
Yo no offense but I’m starting to think you’re part AI or something.
Do not demand things from people as you say here. It is super easy to modify and finish this requirement yourself.
Please keep these in mind for future posts.
Then you can put the script inside the part. I tested this and came back with the same results.
idk man i was told to be formal
Idk what to do anymore, people keep not understanding stuff
i can proove im not idk??
oh ok thanks ill try it!
chat limit
Inside your part put inside it an instance named, “AlignPosition”.
On hearbeat, set the AlignPosition position to the players root part+a vector3 offset with 5 on the Y axis.
We have supplied you with complete scripts to satisfy your requirements. Please mark this answer as a solution as it satisfies your requirements and is a working answer.
nuhhhhhhhhhhhh… UHHH
/e dance3
Do not necropost. This does not contribute to the conversation.
HEYYY ok! were kidna close, part just kinda shakes… a lot
But its very very close.
Also could we add some sort of gyroscope to keep it upright? idk how to do that
what does necropost mean?
char limit
Here is a resource that will answer all of these questions.
The part shakes because it copies the same exact CFrame from the character’s head, which is responsible in the animation played by the character when walking.
I recommend that you replace the Head with HumanoidRootPart in the snippet if you want to achieve more static, “gyroscopic” movement.