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)

4 comments

0

no

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?

0

I've got mine working.

0

It was so hard like You need mouse, bindableEvent, RenderStep, GUI, finally some structure in the way you pull it off...