Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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: '' expected near '"Player.Name"'

5 comments

0

Does it show any errors or warnings?

0

This was answered but the guy has to post his answer

0

I don't know what you mean but I'll answer anyways. It should be workspace.CharacterCamera.CameraPart.Position = Character.HumanoidRootPart.Position.

0

About the error, line 10 requires brackets. Instead of Player."Player.Name", use Player[Player.Name].

0

Ur stupid aaaaaaaaaa, instances have a metatable with an __index field so works ur making me depressed with ur stupidity

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.