I'm attempting to make a team change GUI that clones the team into the teams if it is not already there.
It works fine in Studio although once in game, it doesn't work whatsoever.
This has to be done using FilteringEnabled due to the buyers request.
LocalScript:
local team=game.ReplicatedStorage.Teams[script.Parent.Text]
local player=script.Parent.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
if player:IsInGroup(3159287) then
if game.Teams:FindFirstChild(script.Parent.Text)==nil then
game.ReplicatedStorage.MainframeEvents.CloneCC:FireServer(player)
end
end
end)
--3063035
Script:
local team=game.ReplicatedStorage.Teams:FindFirstChild(script.Parent.Text)
game.ReplicatedStorage.MainframeEvents.CloneCC.OnServerEvent:connect(function(player)
print("Event Fired")
team:Clone().Parent=game.Teams
script.Parent.Parent.Parent.Parent.Parent.Parent.Team=game.Teams[script.Parent.Text]
player:LoadCharacter()
end)

1 comment
Tried it, still wont work in play mode. Any suggestions?