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

Why isn't the GUI showing up when I sit down?

So I have this script that some people help me with. (Thank you to all who did. :D) The script that I made is not working.

script.Parent.Changed:connect(function(property)
	local occupant = script.Parent.Occupant
	
    if occupant then
		local character = occupant.Parent
		local player = game.Players:GetPlayerFromCharacter(character)
		if player then
			local gui = player.PlayerGui["Catalog GUI"]
			gui.MainHolder.Visible = true
		end
    end
end)

1 answer

See if this will work.

local seat = script.Parent

local ownervalue = seat.OwnerValue

seat.ChildAdded:connect(function(child)
	if child:IsA("Weld") and child.Name == "SeatWeld" then
		local character = child.Part1.Parent
		local player = game.Players:GetPlayerFromCharacter(character)
		if player then
			local gui = player.PlayerGui["Catalog GUI"]
			gui.MainHolder.Visible = true
		end
	end
end)

1 comment

0

Anyway to make it so that when they get off the seat, it closes?

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