Hello, I am not a very good scripter, in fact, I do not know how to script really at all, so help is very much appreicated. My problem is, I have a group team change gui that I got from free models, and it works in my "training base" but not in my "capital".It works in studio, however. I then thought it was a problem with the model. I edited the script so it should work, but again, it worked in Studio, but not ingame. Here are the scripts.
function Click(mouse)
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(3363046) then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Crimson")
end
end
script.Parent.MouseButton1Click:connect(Click)
and here is the script for the visitors.
function Click(mouse)
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Medium stone grey")
end
script.Parent.MouseButton1Down:connect(Click)
I am aware of the waitforchild function but the problem is is that I have no idea where to put it or what to put in the parantheses. Thanks, and help is much appreciated.

3 comments
Do your scripts produce any output?
Added a GIF for what happens. https://gyazo.com/ff327f186eac92e1a04a5ec33afc0f71
How do I check that?