Recently I have come across a few bugs with my game.
Once I made large edits to my scripts in my studio then save > publish the scripts dont update to the newer version that I updated them to. yet they throw the errors that they thrown on the older versions.
Is this a bug with my game or is it something to do with this collaborative editing thing?
Its showing this, but I obliterated the use of the 049_Infected value in my new script and as you can see below there is nothing that is calling on that value:
function FindPlayer(Location)
local list = game.Workspace:children()
local torso = nil
local dist = 1000
local temp = nil
local human = nil
local temp2 = nil
for x = 1, #list do
temp2 = list[x]
if (temp2.className == "Model") and (temp2 ~= script.Parent.Parent) then
temp = temp2:findFirstChild("UpperTorso")
human = temp2:findFirstChild("Humanoid")
if (temp ~= nil) and (human ~= nil) and (human.Health > 0) and not temp2:FindFirstChild("Infected").Value == true then
if (temp.Position - Location).magnitude < dist then
torso = temp
dist = (temp.Position - Location).magnitude
end
end
end
end
return torso
end
--wait(math.random(0,5)/10)
while true do
wait(0.5)
if not script.Parent.Parent.Mid.Value == true then
local target = FindPlayer(script.Parent.Parent.UpperTorso.Position)
if target ~= nil then
script.Parent.Parent.Humanoid:MoveTo(target.Position, target)
end
end
end
I hit save and publish like 5 times and spammed the shutdown all servers button, and nothing is coming through, I even tried publishing it to a whole new place and the same thing is happening again! ahh this is so frustrating.
it could be, just make sure that you don’t have any other scripts(clones) possibly doing this(infinite yielding error) anywhere else in your game, check through your game, try relaunching(studio, again) or even restarting (your computer). if all else fails, as a last resort contact support or submit a bug report( only submit a report, if you truly know this is a bug)
So, I pasted the model witht he scripts in into a blank baseplate and the changes I made on my other studio instantly reverted to the old ones for some reason, so I made the edits again and copied them back over to my other game and for some reason they are working again. I think this is an issue with colaborative editing and it needs to be fixed, because when I deleted my scripts on my game it warned me about something to do with colab editing. I think this is what was breaking it. thanks for the help.
There is a ‘Drafts’ tab; if you go into the View section and click Drafts it shows you your unsaved scripts. When you edit a script on collaborative editing mode you must commit those changes to the server by right clicking the script name in the Drafts tab. This should fix the problem you are experiencing.