For some reason, when I play test my game, all the teams disappear, but when I stop playing, they are still there. Here are some screenshots:
Before and after play testing
During play testing
Thank you for trying to help me
For some reason, when I play test my game, all the teams disappear, but when I stop playing, they are still there. Here are some screenshots:
Before and after play testing
During play testing
Thank you for trying to help me
I think it is supposed to be like that, did you make any code and it error trying to find one of the teams?
I have been following the AlvinBlox tutorial for making a team change GUI. I have been following the code exactly, it should be working, but what happens when I play test is that the teams completely disappear and it comes up as the normal no teams player list. Is there some code I need to use to activate teams?
Thanks!
Sometimes playtesting empties out certain services, I haven’t quite figured out why either. If you want to make sure the teams are there though, try making this script to see if they exist when you playtest.
for i,v in ipairs(game:GetService("Teams"):GetChildren()) do
print(v.Name)
end
If the teams are still there, it should print 3 lines of each team name. If they aren’t, you might need to check your other scripts/models and if it isn’t the result of some bad coding then you may need to make a bug report.
A lot of AlvinBlox tutorials back then are currently outdated, and also occasionally contain bad scripting habits that were not known at the time (no offense to AlvinBlox, hes a cool guy)
The reason why the Team objects are being removed are completely unknown unless you share the scripts, that would really help us.
Oh sorry, I completely forgot about those lol. Here are my scripts. I haven’t finished this yet, but I’m up to the bit where he play tested and it didn’t work. I went in a few hours later and the teams were gone completely for some reason.
--Handle the remote event
game.ReplicatedStorage.ChangeTeam.OnServerEvent:Connect(function(player,teamColour)
player.TeamColour = teamColour
player:LoadCharacter ()
end)
--Team Change Script
--Add teams
local RemoteEvent = game.ReplicatedStorage.ChangeTeam
local menuButton
local frame = script.Parent:WaitForChild("Frame")
--Team colours
local DarkColour = "Really black"
local LightColour = "White"
frame.Dark.MouseButtonClick:Connect (function()
RemoteEvent:FireServer(BrickColor.new(DarkColor))
end)
frame.Light.MouseButtonClick:Connect (function()
RemoteEvent:FireServer(BrickColor.new(LightColour))
end)
Thank you! I downloaded a few, so I will check that too.
I’m pretty sure this won’t work as when your frame.Dark
is clicked, it’ll fire an event which requires tuple arguments a.k.a more than one argument is parsed. It also won’t work because your remote event handler which handles the server sided range of things are storing two arguments as variables where one doesn’t exist (the player argument).
As for @Milennium1902’s reply, viruses/nefarious code won’t typically strike team code. Instead they will try to open up security so clients such as Synapse can get it and wreck havoc, or they just nab your source code/entire game.