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

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

Asked by 9 years ago
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

0
Line 2 ITSolarWinds 25 — 9y

2 answers

Log in to vote
0
Answered by 9 years ago

Its

 :FindFirstChild("SeatWeld")

OR

.ClassName="SeatWeld"
0
Not looking for the player I am looking for the seatWeld :I ITSolarWinds 25 — 9y
0
OHHH okay I understand now! jillmiles1 3 — 9y
0
Tried both of those :I ITSolarWinds 25 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

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?

0
When the player connects to the seat it creates a SeatWeld ITSolarWinds 25 — 9y
0
I have no idea then jaytheidiot 60 — 9y
0
If you put a seat in studio and sit in it look in the workspace ITSolarWinds 25 — 9y

Answer this question