I’m experiencing an issue with the mouse icon “Cross”—it’s not displaying in the game.
whats wrong?
localscript:
-- Get references to the local player and mouse
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
-- Get a reference to the server-side event
local fireEvent = script.Parent.gunFire
-- Connect the script to the Equipped event
script.Parent.Equipped:Connect(function()
local uis = game:GetService("UserInputService")
mouse.Icon = "rbxasset://SystemCursors/Cross"
-- uis.MouseIcon = "rbxasset://SystemCursors/Cross"
uis.MouseIconEnabled = true
end)
-- Connect the script to the Activated event
script.Parent.Activated:Connect(function()
-- Get the target under the mouse
local target = mouse.Target
if target and target.Parent then
-- Fire the server event with the parent of the target
fireEvent:FireServer(target.Parent)
end
end)