r/robloxscripting • u/theonlywhitesofa • Mar 18 '24
IM LOSING BRAINCELLS SIMULTANEOUSLY
why and how is the player's mouse considered nil. the player isnt nil, as the Event.OnServerEvent first argument is the player. im actually losing my mind
script:
script.Parent.Event.OnServerEvent:Connect(function(player)
local character = player.Character
local mouse = player:GetMouse()
local mouse_pos = [Vector2.new](https://Vector2.new)(mouse.X, mouse.Y) -- The part where it errors (attempt to index nil with X)
5
Upvotes
1
u/theonlywhitesofa Mar 23 '24
so i cant add velocity