I read this post and can’t seem to figure it out. I don’t feel like they showed the solution well for others to look at in the future, or maybe I am just dumb and can’t figure it out.
I created a Attachment with a SpotLight in the HumanoidRootPart and I have zero clue how to make it go to the mouses position?
I know that I have to use RunService to make it smooth or something? I am so lost
Someone help and explain this please. and i plan to make it F to toggle
This is all I got right now.
ServerScript inside ServerScriptService named "CreateFlashlight"
local Players = game:GetService("Players")
local player = Players.LocalPlayer
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Wait()
local playerChar = player.Character
local FlashAttachment = Instance.new("Attachment")
FlashAttachment.Parent = playerChar.HumanoidRootPart
FlashAttachment.Name = "FlashlightAttachment"
FlashAttachment.Position = Vector3.new(0, 1.55, -1.5)
local FlashSpotLight = Instance.new("SpotLight")
FlashSpotLight.Parent = FlashAttachment
FlashSpotLight.Angle = 72
FlashSpotLight.Brightness = 2.42
FlashSpotLight.Range = 21
FlashSpotLight.Color = Color3.fromRGB(253,255,203)
FlashSpotLight.Shadows = true
print("Created Flashlight Instance for "..playerChar.Name)
end)