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

Touching part not making BillboardGUi show up?

Asked by 4 years ago
Edited 4 years ago

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.

0
Are you on the execute team? MacauleyP_Plays 15 — 4y
0
Yes, I am TheStarWarsMaster856 12 — 4y
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 MacauleyP_Plays 15 — 4y
0
That's weird, I guess my output was full of ragdoll errors for me to notice, what should I do to fix it? TheStarWarsMaster856 12 — 4y
View all comments (3 more)
0
To fix, you need to fix the typo... MacauleyP_Plays 15 — 4y
0
Alright, let me test it. TheStarWarsMaster856 12 — 4y
0
Nope, It still doesn't work. TheStarWarsMaster856 12 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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

Ad

Answer this question