@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.
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)