Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Local PointLight [SOLVED] [closed]

Asked by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

How would I make a PointLight, local. Meaning that only the player could see it. I don't think it would go in a PlayerGui, so, any help? Is this even possible?

Thanks!

Locked by TheMyrco

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
3
Answered by
Unclear 1776 Moderation Voter
10 years ago

There are a couple ways of making objects like Parts local.

One way is to parent the object to the Camera in a LocalScript...

Instance.new("Part", workspace.CurrentCamera)

Another interesting method is parenting your local object to a Message in the Character object. Objects parented to the message will be localized to the player. Here's an example, assuming the variable character is a reference to the player's Character.

localSpace = Instance.new("Message", character)
Instance.new("Part", localSpace) -- A local Part

Using one of these methods above, we can simply make a Part local and then parent the PointLight to the local Part to get what you're looking for!

0
Thanks! I'll use the first way because it's easier to understand and do. Shawnyg 4330 — 10y
Ad