Photos won't change

@faadee
Hey. I tried the code in my device, and it works! But while testing, I have come across a few possible errors. Kindly check the following:

  • The ManualActivationOnly property of the tool is disabled;
  • The RequiresHandle property of the tool is disabled if it is a non-handle tool.

Ensure those, and the script should work. :slight_smile:

Also, I made slight changes to the script, which allows it to continue switching to img1 even after it reaches img3. Also, it preserves the original copies. I’m just gonna leave that here, in case it helps you.

Script
local mainsgui = workspace.Room.Main.Screen.SurfaceGui

local photo1 = workspace.Room.Main.Screen:WaitForChild("Example1")
local photo2 = workspace.Room.Main.Screen:WaitForChild("Example2")
local photo3 = workspace.Room.Main.Screen:WaitForChild("Example3")
local clone1,clone2,clone3

local photonum = 1


script.Parent.Activated:Connect(function()
	print("Activated")
	if photonum == 1 then
		if clone3 then clone3:Destroy() end
		clone1 = photo1:Clone()
		clone1.Parent = mainsgui
		print("Worked 1")
		photonum += 1
	elseif photonum == 2 then
		clone1:Destroy()
		clone2 = photo2:Clone()
		clone2.Parent = mainsgui
		print("Worked 2")
		photonum += 1
	elseif photonum == 3 then
		clone2:Destroy()
		clone3 = photo3:Clone()
		clone3.Parent = mainsgui
		print("Worked 3")
		photonum = 1
	end
end)
  • I have ManualActivationOnly disabled
  • The RequiresHandle is enabled since the tool does have a Handle

I did try the script, it didn’t work although. Thanks for the reply, but guess it’s just my studio that’s broken.

Maybe it’s something in the studio settings or the game settings.