I have a script inside a tool that detects it when somebody clicks on the tool, but it wont work because i cannot get the mouse for some reason, it says the player exists but when i do player:GetMouse() it returns nil
mousehahha = nil
player = nil
local t = script.Parent
script.Parent.Activated:Connect(function(e)
if e then return end
if t.Parent:IsA("Backpack") then return end
if mousehahha == nil then
if player == nil then
player = game.Players:GetPlayerFromCharacter(t.Parent)
print(player)
end
mousehahha = player:GetMouse()
if mousehahha == nil then
print("No mouse")
print(mousehahha)
end
end
end)