oh i should also add, im a kid??? like i dont have a job or anything, u fr think that a kid is gonna act formal? nah
see thats a real rule and im willing to go by it. From now on i WILL stay on topic.
But reggie was also off topic so i advice him to follow that rule
Place this script in StarterCharacterScripts. It is a server script.
local Character = script.Parent
local Head = Character:WaitForChild("Head")
local HeightAboveHead = 2 -- amount of space from head to part in studs
local HeadPosition = Head.Position -- head's position (holy guacamole! no way jose!)
local PartPosition = Vector3.new(HeadPosition.X, HeadPosition.Y + HeightAboveHead, HeadPosition.Z)
local Part = PathToPart or Instance.new("Part", workspace)
-- Do styling for the part here.
while true do
Part.Position = PartPosition
wait(0.01) -- slight timeout to stop the game from lagging incredibly hard
end
I am sorry for my actions. I have since then removed my comment from the topic as it was not contributing to the discussion.
i should have mentioned, the part is in replicated and i need the script to be in the part so as soon as the part is moved into workspace it begind following the player, also allowing for multiple of these parts to exist
I am also a kid and don’t have a job or anything. I think a kid would act formal.
Replace PathToPart
with the part in ReplicatedStorage. You can add your own code moving the part into Workspace.
will this script work for multiple parts at once?
answer my question dawg
(technically emojis are ok to post)
P.S.: DevForum is designed for support and help for the users who attempted in achieving their solution, not to make scripts for the ones that ask. There are plenty of scripts scattered throughout DevForum which can support what you are trying to achieve.
This may seem off-topic but it’s good practice.
My answer is the solution to your question. Please read the answer carefully and make sure to check all links and documentation references.
how do i tell this part who to follow???
i need to tell the part
“Hey, follow player X”
or
“Hey, follow player Y”
How do i tell it who to follow?
Records the player’s movement every physics frame. And if the table goes over the limit, it looks at the last item in the table and removes it.
Also, I apologize if the thread I responded with was too long.
Please read the code as well as other threads to answer your question. I am not your mother.
Lemme recap on this because yall are seeming to forget things or get them mixed up.
Part needs to follow the player (5 studs above them)
The part is in RS. the script needs to be in the part
The player cant be “Find the first player nearby”, i have to be able to tell the script who to follow specifically.
Thats the end of the recap, i hope yall can understand better now!
You can find these answers yourself instead of asking for them on posts. Developing is solving problems, not asking from others how to fix them.
You can put this information into your topic, so everyone can understand what you a litte bit more specific.
ok, im just making a new post i give up.