So I have a LocalScript that is made to grab a cube. Then I made a UI with a TextLabel and LocalScript that is supposed to show the TextLabel when hovering the cube. Although the UI works, but I cannot grab the cube anymore. If I move the ScreenGui with script in another place where it doesn’t runs (e.g. ServerStorage) the cube acts fine. The grab local script uses userInputService to detect if the player is olding the cube or not. Local script for UI:
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local RunService = game:GetService("RunService")
local MouseGui = script.Parent.TextLabel
RunService.RenderStepped:Connect (function()
if Mouse.Target and Mouse.Target.Name == "GrabPart" then
MouseGui.Visible = true
else
MouseGui.Visible = false
end
end)
