How to change a spotlight's face/How do i make an animation play on tool activation

I’m having problems with changing the spotlight’s face in the script how do i change it?

Another problem i am having is how do i play an animation on tool activation (LMB clicked when tool got equipped)

Face can be changed by using a string.
An example: object.SurfaceLight.Face = "Front"
Simple as that :slight_smile:

Your animation, assuming it’s going to character, should activate on mouse click.
Are you relying on UserInputService or Mouse object?

Make sure the animation is loaded to the humanoid and played.

It breaks my tool, Is there something else i can try?

For the spotlight’s facing position you can change its angle depending on which face you put the spotlight.

For the animation you can:

Tool.Equipped:Connect(function()
animation:Play()
end)

Also doesnt make the face where i want it to be

You can change the face of a part any spotlight emits from with the Face property

SpotLight.Face = Enum.NormalId.Top/Bottom/Front/Back

As for tool activation, if you have a reference to the tool, you can listen for the activation event, which has the added built in bonus that it doesn’t fire when the tool is equipped.

Tool.Activated:Connect(function()
    animationTrackPresumedLoaded:Play()
end)
5 Likes

From what i can tell angle is like range, so it doesnt really help because i need to adjust it to make sure it faces “Bottom”.

Change the spotlight face to bottom or you can test every angle what it shows.

My script creates a new spotlight, The spotlight doesnt exist in the part until i activate the script by clicking the LMB.

Then change the propertie with the instance