Hello guys so I am sure a lot of you know the way GetPlayerFromCharacter() works its when you usually use an event that triggers the player's body in workspace and gets their player form in the players category I want to do the opposite I want to get the character from player and I don't really know how to do that here is my script so far
game.Players.PlayerAdded:Connect(function(player) local bob = player:GetCharacterFromPlayer() local it = Instance.new("Part",bob.HumanoidRootPart) end)
Get the character like this:
local char = workspace:FindFirstChild(player.Name)
Hope this helped.
In the future please add punctuation so we can understand faster and diagnose the problem with more accuracy.
Anyway here you go, its player.Character
Here is how it works.
game.Players.PlayerAdded:Connect(function(player) local bob = player.Character local it = Instance.new("Part",bob.HumanoidRootPart) end)
Its simply an attribute that links directly to the Character.
You can do this through remote events, which in my opinion is a lot easier. Here's a video on remote events. https://www.youtube.com/watch?v=rsDpGP8VaGY