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

Touching part not making BillboardGUi show up?

Hey there, I have this script from a video showing me that if you touch a part, a billboard gui will show up. Here's the script:

local terminateArea = game.Workspace.CDC.TerminateArea
local serverstorage = game:GetService("ServerStorage")
local ExecuteTeam = game:GetService("Teams")("Class-D Personnel")

game.Players.PlayerAdded:connect(function(plr)
	plr.CharacterAdded:connect(function(char)
		local copyTerminateText = serverstorage.TerminateGui:Clone()
		copyTerminateText.Parent = char.Head
	end)
end)

terminateArea.Touched:connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid")then
		local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
		if hit.Parent:FindFirstChild("Head").TerminateGui.TerminateText.Visible == false then
			if game.Players.GetPlayerFromCharacter(hit.Parent).Team == ExecuteTeam then
			end	
			hit.Parent:FindFirstChild("Head").TerminateGui.TerminateText.Visible = true
		end
	end
end)

There are no errors, but when I touch the part, nothing shows up. Any help will be greatly appreciated.

7 comments

0

Are you on the execute team?

0

Yes, I am

0

On line 15 there are two errors. One, there's a line jump between the if and the hit, second, the TerminateText.Visivle should be TerminateText.Visible, simple typos

0

That's weird, I guess my output was full of ragdoll errors for me to notice, what should I do to fix it?

0

To fix, you need to fix the typo...

0

Alright, let me test it.

0

Nope, It still doesn't work.

1 answer

✓ Accepted answer

You're running the Teams Service as a function at line 03. And your Gui is visible when cloned. Try changing some of those.

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