I'm making an FPS (so original, right?) and want the mouse cursor to disappear as soon as you join the game. Considering that PlayerMouse isn't an option, and I don't want to use HopperBins (manually selecting? eww), my only choice is a tool. I can get it to select and change the icon fine, but the problem is if I delete the tool (dont want tool to show, or player be able to deselect it), obviously the cursor resets.
I've read some stuff on forums that there's a way around this, but I can't find it. Basically: Is there a way to automatically change the player's cursor?
To remove the tool gui :
game.StarterGui:SetCoreGuiEnabled("Backpack", false)
Here is about the mouse icon :
http://wiki.roblox.com/index.php?title=Icon_%28Property%29
This should work. Also, the decals i used are just blank images that make the cursor look blank.
0~~~~~~~~~~~~~~~~~
1 ~~~~~~~~~~~~~~~~~
bin = script.Parent
02 normel = "http://www.roblox.com/asset/?id=52574777" -- some random blank images.
03 friendly = "http://www.roblox.com/asset/?id=52574777"
04 enemy = "http://www.roblox.com/asset/?id=52574777"
05 function Run(mouse)
06 mouse.Icon = normel
07 local hit = mouse.Target
08 if (hit == nil) then return end
09 h = hit.Parent:FindFirstChild("Humanoid")
10 if h ~= nil then
11 torso = hit.Parent.Torso
12 if torso ~= nil then
13 if h.Health > 0 then
14 if (torso.BrickColor == bin.Parent.Torso.BrickColor) then
15 mouse.Icon = friendly
16 elseif torso.BrickColor ~= bin.Parent.Torso.BrickColor then
17 mouse.Icon = enemy
18 end
19 end
20 end
21
22 end
23 end
24 script.Parent.Equipped:connect(on)
function on(mouse) while true do wait() Run(mouse) end end script.Parent.Equipped:connect(on)
If this doesn't work, please tell me. It should work.