Weird thing with upgrade button

  1. What do you want to achieve? Keep it simple and clear!
    I wanna achieve my upgrade button works

  2. What is the issue? Include screenshots / videos if possible!
    Issue is odd, because yesterday that script worked fine, now it’s don’t, also i getting weird error in output from strange script(even don’t know what script it is). Here is screenshoots:
    image
    image

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tryed to load my yesterday version, but still no works. This impossible to find that on devhub/youtube lol, it’s most like a studio glitch, bec it worked yesterday

Here is script:

--Upgrade button script
local SpeedLevel = workspace.Factory.SpeedLevel
local PlayerMoney = workspace.Factory.PlayerMoney
if  PlayerMoney.Value >= 1 then
if SpeedLevel.Value == 0 then
	script.Parent.Touched:Connect(function()
		SpeedLevel.Value = SpeedLevel.Value + 1
		script.Parent:Destroy()
		end)
		end
end

And here is odd script:

local larm = script.Parent:FindFirstChild("Left Arm")
local rarm = script.Parent:FindFirstChild("Right Arm")

function findNearestTorso(pos)
	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) then
			temp = temp2:findFirstChild("Torso")
			human = temp2:findFirstChild("Humanoid")
			if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
				if (temp.Position - pos).magnitude < dist then
					torso = temp
					dist = (temp.Position - pos).magnitude
				end
			end
		end
	end
	return torso
end




while true do
	wait(math.random(1,5))
	--local target = findNearestTorso(script.Parent.Torso.Position)
	--if target ~= nil then
	--	script.Parent.Zombie:MoveTo(target.Position, target)
	--end

	script.Parent.Humanoid:MoveTo(Vector3.new(math.random(-100,100),0,math.random(-100,100)), game.Workspace.Base)
	

end

idk what’s script is that, i tested game on viruses 50 times, i have good anti-virus

  • Im not using free models, i build 90% of game by my hands

That error tells you ‘Base’ cannot be found under workspace when you reference it. Can you check in your explorer that ‘Base’ exists in a live test session. Also are you destroying that instance at any point? Also it’s never good practice to reference your instance using the dot operator , use FindFirstChild, or WaitForChild in their appropriate contexts.

I even don’t know what this script is, i didn’t make it. It’s just appeared today lol

No there is no base in workspace

Then you should remove the reference to it in your Humanoid:MoveTo() parameters.

Just remove that line of code yes? Or what, bec i even don’t know what this script do

Hmm i see something weird, this error appears after i buy my dropper hmm

Okay i figured out problem, lemme remove that scripts, i even don’t need them

Okay i removed that script, even don’t need it, but upgrade button still no works. I swear it worked yesterday

Okay i fixed that thing myself