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

How to make a gui appear when a brick is touched by a certain team?

Asked by 7 years ago
Edited 7 years ago
function onTouched(hit)
    if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then 
        if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == script.Parent.BrickColor then
            game.Lighting.NOTICE.Parent = game.StarterGui elseif
             game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then 
        if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == script.Parent.BrickColor then
            game.StarterGui.NOTICE.Parent = game.Lighting
        end
        end
    end

im trying to make it so that when a player touches the brick the gui from lighting called 'NOTICE' gets moved to starter gui, and then moved back if the certain team member is no longer touching the brick, thanks for the help.

0
Did you call the function after wards? rilgundam 65 — 7y
0
Please edit your question to use code blocks (hit the blue orb looking icon in the editing window to create a code block). User#18718 0 — 7y
0
use the code blocks, your script is really hard to read orangebuddycrash 57 — 7y

Answer this question