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

cant find the character out of the player?

the script is inside a part inside the workspace

Ui = script.parent
local player = game.Players.PlayerAdded
local char = player.Character

local weld = Instance.new('Weld')

the main problem is in the

local char = player.Character

im probably doing something dumb right now

if something is missing just comment

thanks for helping!

-UPDATE: i am simply trying to find the character

2 comments

0

What are you trying to do?

0

Well assuming the 'player' variable isn't nil, in between lines 2 and 3 add 'repeat wait() until player.Character'. Also I think on line 2 you should add 'local player = game.Players.PlayerAdded:wait()

1 answer

✓ Accepted answer

If you are wanting to make something to happen to a player or character when they join, you need to make the Player Added or Character Added function.

-- You can access things up here
game.Players.PlayerAdded:Connect(function(Player)-- You have now found the "Player" that joins
    Player.CharacterAdded:Connect(function(Character) -- You have now found they "Character" of the Player
        --Now, you can do the welding here
    end)
end)

2 comments

0

If you were to explain what you were trying to do, I could help you more.

0

i rlly just wanted to find the character

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