(Bruh i forgot to change from unsolved to solved )
Hi, i am trying to make a flashlight with a Spotlight, that would follow players camera and be there everytime. But i have no idea how to. I tried parenting it to player’s head but i would need to make player head movement - which i did but it looked laggy. I would be happy for every response about it.
Instead of parenting it to the player’s head maybe you could try parenting it to the player’s camera? If this doesn’t work, you can do this:
local camera = game.Workspace.CurrentCamera--note that this only works in local which could be a problem of not
local FlashLight = game.Workspace.?--remember to assign this to your flashlight no need to make multiple since the movement will be local
while true do
FlashLight.Position = camera.Position--this makes the flash light position the same as the camera position
FlashLight.Orientation = camera.Orientation
task.wait(.05)
end
This is a simple script but should work, thanks for reading
Well, they don’t really work. There is no property in cera called Position or Orientation. And changing it’s CFrame doesn’t work too. Or im just doing it wrong. It may be confusing, but i want to do the GMOD flashlight effect. The one after clicking F i think. Is it possible?