How to know the orientation of an instance pointed by the mouse

I was wondering how I could fix this in my script that I don’t know how to do:

The problem in case you didn’t understand is that when the decal appears (to simulate the shot) it appears in a specific orientation and I want it to adapt according to the instance that the mouse points to:

local mouse = tuputamadre.mouse
local gayelquelolea = hole:Clone()
gayelquelolea.Parent = game.WorkSpace
gayelquelolea.CFrame = CFrame.new(Vector3.new(mouse.Hit.X,mouse.Hit.Y,mouse.Hit.Z))
gayelquelolea.Orientation = --what you think I should put

Basically in the incomplete part I want to put the orientation of the part where the cloned hole stays so that it looks as if it were lying on the surface (the instance)

You need to do:

mouse.Target.Orientation

If I’m not wrong, that should check the part the mouse is pointing at and it’s orientation

1 Like

I remember that I underestimated you because you didn’t know how to program some things, thanks

Yeah, I remember taht too :sweat_smile: it’s past now, don’t worry, I’m always here to help if you need! I learned a lot in the past few weeks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.