so i tried to make a tool but i got this error. 11:31:42.972 - Players.Abacus300.Backpack.Cash Giver.LocalScript:2: attempt to index global 'player' (a nil value) This is my code
local module = require(script.Parent:WaitForChild("ModuleScript") )local mouse = (player:GetMouse() )local player = game.Players.LocalPlayer() script.Parent.Activated:Connect(function() module.Lift() end)
Please Help me
Next time please use the code block when posting code, and don't have it all jumbled up. Space it out, it'll help.
The problem (as you might imagine) is right here:
local player = game.Players.LocalPlayer()
.LocalPlayer() is not a function or anything where you would need the (), so just remove it.
Correct code:
local player = game.Players.LocalPlayer
Let me know if you have any questions