This is for my new RPG game
In an infinite loop check for player distance from the part, since PointLight spreads in all directions
while wait() do for k,v in next, game.Players:GetPlayers() do if v:DistanceFromCharacter(script.Parent.Position) <= script.Parent.PointLight.Range then v.Character.Humanoid.Health = 0 end end end
Hi, FancyClone! Try using functions, to be exact, the onTouched function. Here is your syntax:
--Put the follow script into the part the pointLight is in, and edit to your choice. function onTouched(hit) --Here is your part. Try to see if you can find how to delete the part your player touches, and --bring up a GUI. I am not giving you the full answer as this website is not for requesting, but for help. end script.Parent.Touched:connect(onTouched)
Closed as Not Constructive by Sublimus, Dummiez, and Articulating
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?