Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I keep getting an error " This Mouse is no longer active"(?)

I tried to simplify the code, so i don't have to use remote events. i have done this before and it worked. Can someone please tell me what i'm doing wrong Output:

This Mouse is no longer active

Script:

local Tool = script.Parent

Tool.Equipped:Connect(function(Mouse)
    Tool.Activated:Connect(function()
    
    local Poof = Instance.new("Part")
    Poof.Shape = "Ball"
    print(Mouse.Hit)

    Poof.Parent = game.Workspace
    Poof.CFrame = CFrame.new(Mouse.Hit)
    
    end)
end)

1 answer

✓ Accepted answer

Hey there, if you are using a server sided script, you cannot obtain the Mouse object in any way possible, it is client sided, except for having the client pass the Mouse.hit / Origin / Target or any other property VIA a remote-event or remote-function.

1 comment

0

ahh, ok. I know what happened last time now! Thanks!!

This discussion is preserved as it was. New answers, comments, and votes are closed.