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

How would I make a particle follow a mouse?

So I recently found this game and I really liked a mechanic that they had, but I have a few questions about how I would make something like this.

https://i.gyazo.com/cda2beba3bd934e5ddbb92602b3fddb8.gif

I tried attaching a particle emitter to the hand's attachment, and it works and gives off a similar effect, and I made it so that the orientation of the attachment equals the mouse look vector but it makes it look really weird and the position isn’t accurate. I made something like

Attachment.Orientation = mouse.Hit.LookVector

But how would I make something similar to that because the way I tried it didn’t really give an accurate position. Thank you for anyone who gives me insight, I think the way this deals damage is by raycasting but I’m not sure

3 comments

0

The gyazo link is blocked

0

are you wanting the particle to look at the mouse, or have its position set at the mouse? The Gyazo is blocked, as ray has stated

0

here is the fixed link of what he was trying to show: https://gyazo.com/cda2beba3bd934e5ddbb92602b3fddb8.gif

1 answer

How about doing

local player = game.Player.Localplayer
local head = player.Character.Head
Attachment.Orientation = (head.CFrame.p - mouse.Hit.p).unit

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