I am trying to make a script that randomly selects an online friend and turns your character into theirs, but for some reason the script loops and there aren't any while, for, or repeat loops in the script. The looping causes my character to constantly change. The script also re-enables even after I put script.Disabled = true. What's causing this problem is line 11, and deleteing the script doesn't work either. It "comes back to life" and keeps looping
this is the localscript
wait()
local plr = game.Players.LocalPlayer
local friend = plr:GetFriendsOnline(200)
local one = math.random(1,#friend)
local chosenOne = friend[one]
print(tostring(chosenOne.UserName))
print(tostring(chosenOne.VisitorId))
game.ReplicatedStorage.AddFriendChar:FireServer(chosenOne.VisitorId)
script.Disabled = true
this is the script in ServerScriptService
game.ReplicatedStorage.AddFriendChar.OnServerEvent:Connect(function(p, id)
p.CharacterAppearanceId = id
p:LoadCharacter()
end)
