Why doesn't it work on a client server?
** So this code is suppose to make a gooey right next to your mouse saying the name of the part** . the thing is if you test it in studio mode it works perfectly fine! When you test in client mode nothing works. Not a single thing happens when you even hover over the part or click it.
01 | script.Parent.ClickDetector.MouseHoverEnter:connect( function () |
02 | local Mouse = game.Players.LocalPlayer:GetMouse() |
03 | local Gui = Instance.new( "ScreenGui" ) |
04 | Gui.Parent = game.Players.LocalPlayer.PlayerGui |
05 | Gui.Name = "ObjectVar" |
06 | local text = Instance.new( "TextLabel" ) |
08 | text.Text = script.Parent.Name |
09 | text.Size = UDim 2. new( 0 , 200 , 0 , 30 ) |
10 | text.BorderColor 3 = Color 3. new( 0 , 0 , 0 ) |
11 | text.BorderSizePixel = 1 |
12 | text.TextColor 3 = Color 3. new( 255 , 255 , 255 ) |
13 | text.TextStrokeColor 3 = Color 3. new( 0 , 0 , 0 ) |
14 | text.TextStrokeTransparency = 0 |
15 | script.Parent.ClickDetector.MouseClick:connect( function () |
16 | script.Parent:Destroy() |
17 | game.Players.LocalPlayer.PlayerGui.ObjectVar:Destroy() |
the part right here makes it when the mouse is not hovering over the part the Gooey is deleted. I'll put it here so you have the full script
No errors in output
1 | repeat text.Position = UDim 2. new( 0 ,Mouse.X, 0 ,Mouse.Y) wait() until |
2 | Mouse.X > 500 or Mouse.Y > 600 |
3 | script.Parent.ClickDetector.MouseHoverLeave:connect( function () |
4 | game.Players.LocalPlayer.PlayerGui.ObjectVar:Destroy() |