Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

cant find the character out of the player?

Asked by 7 years ago
Edited 7 years ago

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

0
What are you trying to do? FiredDusk 1466 — 7y
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() laughablehaha 494 — 7y

1 answer

Log in to vote
0
Answered by
FiredDusk 1466 Moderation Voter
7 years ago

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)

0
If you were to explain what you were trying to do, I could help you more. FiredDusk 1466 — 7y
0
i rlly just wanted to find the character TigerClaws454 48 — 7y
Ad

Answer this question