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

What's wrong with this script?[Not Answered]

script.Parent.ChildAdded:connect(function(player)
if child.Name == "SeatWeld" then do
a = game.Lighting.HealthStatus:clone().Parent.LocalPlayer.PlayerGui
if game.Player.LocalPlayer.PlayerGui:findFirstChild("HealthStatus") ~= nil then
a.Parent = game.Players.LocalPlayer.PlayerGui


end	


end


end
end)

I am trying to get it to connect to the player when he seats aka SeatWeld

1 comment

0

Line 2

2 answers

Its

 :FindFirstChild("SeatWeld")

OR

.ClassName="SeatWeld"

3 comments

0

Not looking for the player I am looking for the seatWeld :I

0

OHHH okay I understand now!

0

Tried both of those :I

I was going to say

script.Parent.ChildAdded:connect(function(player)
if player.Name == "SeatWeld" then do
a = game.Lighting.HealthStatus:clone()
a.Parent = player.Startergui
if player.PlayerGui:findFirstChild("HealthStatus") ~= nil then
a = game.Lighting.HealthStatus:clone()
a.Parent = player.PlayerGui
end 
end
end
end)

What do you mean looking for the seatweld? seatweld in what?

3 comments

0

When the player connects to the seat it creates a SeatWeld

0

I have no idea then

0

If you put a seat in studio and sit in it look in the workspace

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