New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How to make a Part's Position be the same as a Player's Position?

Asked by 1 year ago
Edited 1 year ago

local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Camera = workspace.CurrentCamera

repeat wait() Camera.CameraType = Enum.CameraType.Scriptable until Camera.CameraType == Enum.CameraType.Scriptable Camera.CFrame = workspace.CameraPart.CFrame workspace.CharacterCamera.CameraPart.Position = Player."Player.Name".Humanoid.Position

So I don't know how to define the "Player" once he's joined the game is all. There's an output msg - Players.Dudez2Good4u.PlayerGui.Camera:10: '<name>' expected near '"Player.Name"'

0
Does it show any errors or warnings? Y_VRN 91 — 1y
0
This was answered but the guy has to post his answer Dudez2Good4u 20 — 1y
0
I don't know what you mean but I'll answer anyways. It should be workspace.CharacterCamera.CameraPart.Position = Character.HumanoidRootPart.Position. Y_VRN 91 — 1y
0
About the error, line 10 requires brackets. Instead of Player."Player.Name", use Player[Player.Name]. Y_VRN 91 — 1y
0
Ur stupid aaaaaaaaaa, instances have a metatable with an __index field so works ur making me depressed with ur stupidity User#24403 26 — 1y

1 answer

Log in to vote
0
Answered by 9 months ago

Just do a while true do loop and make it wait (0.1) then part.position = player's humanoid.position

Ad

Answer this question