Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trying to make an ImageLabel Appear for a few seconds when the player hits this block?

Asked by
81b 5
8 years ago
Edited 8 years ago

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.

0
What does your output say? SHDrivingMeNuts 299 — 8y
0
I'm not getting anything from it. 81b 5 — 8y

Answer this question