I am not sure why this isn't working to move down the part FlagFlag also, the part FlagFlag is not the part this script is on... edit I managed to fix somethings this is the new script I am currently getting an error of:

attempt to compare userdata with number edit 2 I managed to fix the main issue but whenever I run the script my studio crashes


--Vars
 captureing1 = false


script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
		if captureing1 == false then 
				captureing1 = true
		end
		
				if (captureing1 == true) then 
	print("Worked")
		end
		
		while (captureing1 == true) do
while (game.Workspace.FlagFlag.Position.Y <= 59.99) do
while wait(0.1) do 
game.Workspace.FlagFlag.Position = game.Workspace.FlagFlag.Position + Vector3.new(0,-1,0)
			  		 end
				end	
			end
		end
	end)

3 comments

0

try remove 09. If there where any output errors tell us

0

attempt to compare userdata with number

1

FlagFlag.Value instead of FlagFlag, FlagFlag is likely a NumberValue or IntValue