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

I am issueing an unknown error in my team gui giver, how would I fix it?

Asked by 6 years ago

Hello, first off let me explain who I am and what my issue is, My name is Dark_Dimensions and I am currently making a police simulator game and I have come across a issue with grabbing the teams and the players on that team and giving them a gui that is located in replicatedstorage, This is a local script and the game itsself is FE.

local player = game:GetService("Players").LocalPlayer
Button = script.Parent


Button.MouseButton1Down:connect(function()
local teams = game:GetService("Teams"):GetTeams()
for _, team in pairs(teams) do
local players = Team:GetPlayers("Steel blue")
    local b = game.ReplicatedStorage.CallOutGuis.OfficerRequestingBackup:Clone()
    b.Parent = players.PlayerGui
end)

This is the script I currently have, if anyone could possibly explain to me as to what I am doing wrong here and how it can be fixed and what I could do in the future to prevent this from happening it would be wonderful!

0
You're missing an end for your for loop Gey4Jesus69 2705 — 6y

Answer this question