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

[Weird error] A GUI only made invisible to a specific team?

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Sprint = ReplicatedStorage.Sprint

Character:WaitForChild("Humanoid").Died:Connect(function()
    if LocalPlayer.Team.Name == "Zombies" then
       Sprint.Visible = true
   end
end)

When a player dies , it detects if he is on Zombies if yes which in this case is yes then the visibility of a GUI called "Sprint" is visible. (Right now the gui sprint is invisible)

This local script is inside the StarterCharacterScripts.

When I die I am indeed on the zombie team so now idk what is the error.

1 answer

You have to clone your sprint gui, if you edit the GUI within ReplicatedStorage it's not gonna do much.

Make sure to clone an instance from the ReplicatedStorage one and parent that to Player.PlayerGui

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