I am trying to make it some when you hover over a part it's bilboard gui highlight (by setting text stroke transparency = 0). But when I did
local ts = game:GetService("TweenService") local linear_bi = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) script.Parent.MouseHoverEnter:Connect(function(plr) local tween = ts:Create(script.Parent.Parent.BeforeHead.TextLabel, linear_bi, { TextStrokeTransparency = 0 }) tween:Play() end) script.Parent.MouseHoverLeave:Connect(function(plr) local tween = ts:Create(script.Parent.Parent.BeforeHead.TextLabel, linear_bi, { TextStrokeTransparency = 1 }) tween:Play() end)
Then I looked for other questions on here and got the idea of using RemoteEvent on the server and firing the client. However when I did this it didn't work. SERVER
script.Parent.MouseClick:Connect(function() script.Parent.Parent.Parent.Health.Value = script.Parent.Parent.Parent.Health.Value - 1 end) script.Parent.MouseHoverEnter:Connect(function(plr) script.Parent.Enter:FireClient(plr) end) script.Parent.MouseHoverLeave:Connect(function(plr) script.Parent.Leave:FireClient(plr) end)
CLIENT
local ts = game:GetService("TweenService") local linear_bi = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) script.Parent.Enter.OnClientEvent:Connect(function(plr) print("Enter CLIENT") local tween = ts:Create(script.Parent.Parent.BeforeHead.TextLabel, linear_bi, { TextStrokeTransparency = 0 }) tween:Play() end) script.Parent.Leave.OnClientEvent:Connect(function(plr) local tween = ts:Create(script.Parent.Parent.BeforeHead.TextLabel, linear_bi, { TextStrokeTransparency = 1 }) tween:Play() end)
Thank you!
Make a Local Script in the StarterGui instead of using local script into the main Model
Example:
--StarterGui Script Local ClickDetect = game.Workspace.Part.ClickDetector ClickDetect.MouseClick:Connect(function() --Do Something end