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

How can I create a Mouse.Hit where you can hit players with items?

Asked by
xudet 0
4 years ago

Hello there, I am creating a simulator game but I am wanting a system where if you click down the mouse you can throw Eggs at people and they lose health, I was just curious how I would go about this.

Would I use RayCasting or what?

Thank you!

1 answer

Log in to vote
0
Answered by
rower86 35
4 years ago

If you are throwing an item, you can use many things to move objects: CFrame lerping, CFrame changing, Body movers, tween, and possibly more I don't know about

https://developer.roblox.com/en-us/api-reference/datatype/CFrame https://developer.roblox.com/en-us/articles/BodyMover https://developer.roblox.com/en-us/api-reference/class/Tween

Also, please do not make the very annoying simulator game where you literally copy paste another game and change the theme, it's just cruel to see people actually play those and the creators making money off of other people's ideas

Ad

Answer this question