On line 41/42 the Frame won’t go visible. I’ve tried:
Frame.Visible = true
Still won’t go visible what is the possible issue??
Here is what I have set for now:
Frame.Visible = not Frame.Visible
local Load = script.Parent.Parent.Parent.Load
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Teams = game:GetService("Teams")
local Frame = script.Parent.TeamChanger
Frame.Prisoner.MouseButton1Click:Connect(function()
Load.Visible = true
Load.Text = "Loading."
wait(1)
Load.Text = "Loading.."
wait(1)
Load.Text = "Loading..."
wait(1)
Load.Text = "Loading...."
wait(1)
Load.Text = "Successfully Loaded"
wait(1)
Load.Visible = false
Frame.Visible = false
ReplicatedStorage.Handler:FireServer("SwitchTeam", tostring(Frame.Prisoner.Name))
end)
Frame.RCMP.MouseButton1Click:Connect(function()
Load.Visible = true
Load.Text = "Loading."
wait(1)
Load.Text = "Loading.."
wait(1)
Load.Text = "Loading..."
wait(1)
Load.Text = "Loading...."
wait(1)
Load.Text = "Successfully Loaded"
wait(1)
Load.Visible = false
Frame.Visible = false
ReplicatedStorage.Handler:FireServer("SwitchTeam", tostring(Frame.RCMP.Name))
end)
script.Parent.Switcher.MouseButton1Click:Connect(function()
Frame.Visible = not Frame.Visible
end)
ReplicatedStorage.Handler.OnClientEvent:Connect(function(Argument, Prompt)
if not Argument then return end
if Argument == "HidePrompt" then
for _, v in ipairs(Players:GetPlayers()) do
if v.Arrested.Value == true then
v.Character.HumanoidRootPart.ProximityPrompt.Enabled = false
end
end
elseif Argument == "PlayerTeam" then
for _, v in ipairs(Players:GetPlayers()) do
if v.Team == Teams.RCMP then
if v.Character:FindFirstChild("ArrestTool") then
Prompt.Enabled = true
end
end
end
end
end)