script is inside the playergui
Mouse = script.Parent.Parent:GetMouse()
it says "Mouse" is a nil value i used this script back in the day but now it doesnt work any help? plz
script is inside the playergui
Mouse = script.Parent.Parent:GetMouse()
it says "Mouse" is a nil value i used this script back in the day but now it doesnt work any help? plz
Write this code in a LocalScript and put that inside StarterGui or wherever it can run.
-- LocalScript.
local Plr = game:GetService("Players").LocalPlayer
local Mouse = Plr:GetMouse()
Switch the script to a 'LocalScript' and you can write
local mouse = script.Parent.Parent:GetMouse()
or to be exact more specific
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Mouse = game.Players.LocalPlayer:GetMouse()
USE A LOCAL SCRIPT IN STARTER GUI ONLY unless you know what your doing
Yeah Sorry Forgot
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
this is a "script"
only a local script can access the players mouse.
ohhhhhh
im so stupid Thnx
can u write that in the "Answer this question" section so that i can reward u with 1+ point