so, I am trying to make a placement system and I keep trying to get the mouse position. I am trying to only use the Y position for this. I've tried this
workspace.Handgunner.Position = Mouse.Position
and I could not find anything that would help.
so, I am trying to make a placement system and I keep trying to get the mouse position. I am trying to only use the Y position for this. I've tried this
workspace.Handgunner.Position = Mouse.Position
and I could not find anything that would help.
Like YoutubeMaster Said, mouse.Hit.Position, returns a CFrame, and as you said, the HandGunner is a model, so you would need to do:
workspace.HandGunner.PrimaryPart.CFrame = mouse.Hit
That should work. All it does is just move the models primary part to the mouse.Hit CFrame Or you could do:
workspace.HandGunner:SetPrimaryPartCFrame(mouse.Hit)
Say Mouse.Hit.CFrame lol
Mouse hit is a CFrame itself.
As 14zanderbilt, change Mouse.Position to Mouse.Hit.Position. Mouse.Hit returns a CFrame. CFrames have a property called "Position", which gets the Vector3 of the CFrame.
Fixed Part:
workspace.Handgunner.Position = Mouse.Hit.Position
property, not value :P
tried that
Sorry. I guess I "mixed up" my words.
Wouldn't that just return what @VortexGamingPlayerYT said? He got an error saying, that when he ran that code, it syas "Vector3 Expected"
@VortexGamingPlayerYT Does it give you an error? What are you trying to accomplish? Please be more descriptive while posting a question.
ok so it doesnt error just gives a weird problem
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Change mouse.Position to mouse.Hit.Position
wth I just use mouse.Hit.p