Simple script: Part that follows player

I wanted to make a simple part that follows me using ChatGPT (To understand more about the scripting itself) I don’t know if using scripts made by AI itself is the cause but I just cannot go further after “if player and player.Character then”

  1. What do you want to achieve? I want to make a script where a “Part” follows mee

  2. What is the issue? The script will only go as far as the first while loop and then it will stop


  3. What solutions have you tried so far? I currently use AI for me to make things simple and for me to understand more

2 Likes

You are getting LocalPlayer in a server script, which won’t even work as there is no LocalPlayer on the server. It only works with local scripts, but since they can’t run in workspace (which the part is parented to), just set the script’s RunContext to Client

This belongs to #help-and-feedback:scripting-support, you might want to move this topic to that category

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.