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

Why is my textlabel not appearing when a mouse hovers over the brick where its supposed to appear?

Asked by 4 years ago
Edited 4 years ago

I am having trouble to getting my script which makes a textlabel appear when a person's mouse hovers over the brick that I assigned to make the textlabel appear. this script is in Startergui and is a local script. Any suggestions are appreciated. No errors appear

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local SHOWGUI = workspace.Mannequin.SHOWGUI
local ScreenGui = script.Parent.ScreenGui
local TextLabel = ScreenGui.TextLabel
game:GetService('RunService').RenderStepped:Connect(function()
    local X = Mouse.X
    local Y = Mouse.Y
    if Mouse.Target and Mouse.Target.Name == 'SHOWGUI' then
        TextLabel.Visible = true
        TextLabel.Text = "Click to try on Shirt"
TextLabel.Position = UDim2.new(0,X,0,Y)
    else
        TextLabel.Visible = false
end
end)
0
no Zeppelin0330 38 — 4y
0
Okay, I had a error because I didn't wrap my entire thing in a run service like you. Now it detects the part is where I'm on. Now I'll make a GUI Label and see if it opens/closes? Fate2Seal 5 — 4y
0
I've got mine working. Fate2Seal 5 — 4y
0
It was so hard like You need mouse, bindableEvent, RenderStep, GUI, finally some structure in the way you pull it off... Fate2Seal 5 — 4y

Answer this question