#Getting the Players position
1 messages · Page 1 of 1 (latest)
playervariable.Character.HumanoidRootPart.Position
local PlayerPosition = playervariable.Character.HumanoidRootPart.Position does this save the playres position in a variable?
yeah sure but you need to define the playervariable variable
also it only saves it once
i recommend doign some research before opening up a post, but it's fairly simple. you get the cframe or position of the humanoidrootpart of the character.
so local playervariable = ???
** You are now Level 3! **
thank you so much i hope i can get it to work
okay so its not working and i dont know w hat im doing worng can you help?
game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.KeyCode==Enum.KeyCode.E then
local SpawnedPart = Instance.new("Part", workspace)
local playervariable = game.Players.LocalPlayer
local PlayerPosition = playervariable.Character.HumanoidRootPart.Position
SpawnedPart.BrickColor = BrickColor.new("Really red")
SpawnedPart.Shape = "Ball"
SpawnedPart.Material = Enum.Material.SmoothPlastic
SpawnedPart.Position = Vector3.new(PlayerPosition)
end
end)
chatgpt helped me nvm
@small tartan :(
** You are now Level 4! **
Start over
before learning how to script i suggest learning about a website:
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
** You are now Level 6! **