Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make a particle follow a mouse?

Asked by 3 years ago
Edited 3 years ago

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

0
The gyazo link is blocked rayhansatria 142 — 3y
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 Despayr 505 — 3y
0
here is the fixed link of what he was trying to show: https://gyazo.com/cda2beba3bd934e5ddbb92602b3fddb8.gif Bloxwood1222 -3 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

How about doing

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

Answer this question