So, the script from the other post works (https://scriptinghelpers.org/questions/116927/touching-part-not-making-billboardgui-show-up) but now it shows the terminate text even when you're on a different team. Can someone help please?
✓ ANSWER ACCEPTED
Follow-up question to "Touching part not making BillboardGUi show up?"
1 answer
✓ Accepted answer
Error Script:
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 -- this line of code is supposed to be in the last "if" statement I assume
end
end
end)
Fixed Script:
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
hit.Parent:FindFirstChild("Head").TerminateGui.TerminateText.Visible = true -- Intended placement
end
elseif hit.Parent:FindFirstChild("Head").TerminateGui.TerminateText.Visible == true then
if game.Players.GetPlayerFromCharacter(hit.Parent).Team ~= ExecuteTeam then
hit.Parent:FindFirstChild("Head").TerminateGui.TerminateText.Visible = false -- make the gui invisible if the visibility is set to true and the player is not on the "execute" team
end
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
It works, but on line 09 and 05 it says that it expected ":". but either way, thanks!
I copied the script in ur post xD, sry I didnt check properly