how do u use Mouse.target? I have tried every method like this for my homing missile:
local Player = Game.Players.LocalPlayer local Mouse = Player:GetMouse() function onClicked(playerWhoClicked) game.Workspace.Model.rocket.RocketPropulsion.Target = Mouse.Target game.Workspace.Model.rocket.RocketPropulsion:Fire() script.Parent.ClickDetector.MouseClick:connect(onClicked)
It says Mouse.Target does not exist plz help
Hi!
The Mouse.Target refers to the object that the mouse is pointing to. Therefore it is a BasePart value, not a position value. What I think you meant to use was Mouse.Hit, a property that refers to the position the mouse is pointing at.
local Player = Game.Players.LocalPlayer local Mouse = Player:GetMouse() function onClicked(playerWhoClicked) game.Workspace.Model.rocket.RocketPropulsion.Target = Mouse.Hit game.Workspace.Model.rocket.RocketPropulsion:Fire() script.Parent.ClickDetector.MouseClick:connect(onClicked)