I have this script that is supposed to make a Screengui's ImageLabel appear on the player's screen for a few seconds and then promptly disappear, but the Image isn't showing up. Here's the script I have:
local player = game.Players.LocalPlayer function onTouched(hit) local character = hit.Parent if character and character:findFirstChild("Humanoid") then player.PlayerGui.ZoomGui.ZoomPic.Visible = true wait(1.5) player.PlayerGui.ZoomGui.ZoomPic.ImageTransparency = .4 wait(0.35) player.PlayerGui.ZoomGui.ZoomPic.ImageTransparency = .6 wait(0.35) player.PlayerGui.ZoomGui.ZoomPic.ImageTransparency = .8 wait(0.35) player.PlayerGui.ZoomGui.ZoomPic.Visible = false player.PlayerGui.ZoomGui.ZoomPic.ImageTransparency = 0 end end
The local character = hit.Parent and the line below it is just there to detect if the person hitting it is a player. What's wrong with my script? I have the screengui and it's child in the StarterGui, so those both appear in the PlayerGui too. Zoomgui is the name of my screengui and the Zoompic is the name of my ImageLabel.