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

Button on a SurfaceGui is'nt working?

Hi,

i'm trying to make a system where passengers can book there seat. Now there is a Button on a SurfaceGui, but if i click it, nothing happens. (Also nothing in the Dev Console)

Here's my Script:

script.Parent.MouseButton1Click:connect(function()
	
	local playername = game.Players.LocalPlayer.Name
	local player = game.Players:FindFirstChild("playername")
	local playerbp = player:FindFirstChild("Backpack")
	
	if playerbp:FindFirstChild("HasEco") then
		
		script.Parent.Text = "Select!"
		playerbp.HasEco:Destroy()
		
		else
		
		if playerbp:FindFirstChild("HasBuz") then
			
			
			
		else	
			
			if playerbp:FindFirstChild("HasFirst") then
				
				
				
				else
				
				
				
			end
			
		end
		
	end
	
end)

Yeah, that's it.

1 answer

✓ Accepted answer

I'll quote this from the wiki,

Note: SurfaceGuis must be descendants of PlayerGui in order to know the player who is interacting with it.

SurfaceGui's

This is my best guess why it doesn't work, I can't figure out any solution for this.

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