Hello all, I've been having a lot of trouble with this lately so here goes.
I am attempting to create a prison game, and like the game "Prison Life" you choose guards or inmates. So I've gotten up to the point where I am viewing the baseplate with a part once joined. But with another script, I run "player:LoadCharacter" and it sends me back to the viewing part. I tried without the load character and I reset my character and it went back to the part. So what I need is to disable the script from running after resetting my character. The script for the part is located in StarterCharacterScripts.
Here is my team change script (to handle remote event) (In: ServerScriptService)
-- Handle RemoteEvent
game.ReplicatedStorage.ChangeTeam.OnServerEvent:Connect(function(player,teamColor)
player.TeamColor = teamColor
wait(1)
-- below is what is causing the problem, but resetting causes it as well
player:LoadCharacter()
end)
Here is my Local Script that changes the team (not the whole script) (In: ScreenGUI)
frame.Inmates.MouseButton1Click:Connect(function()
RemoteEvent:FireServer(BrickColor.new(InmateColor))
frame.Visible = false
print("running camera switch back")
Camera.CameraType = "Custom"
end)

1 comment
Great suggestion, however I tried both of these and it would not work. Roblox clones scripts and script.Destroy() or disabling the script would be unfortunately useless. (at least what I found online)