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

Can anyone help me make this script OnEntered ? [closed]

Asked by 9 years ago

I have a brick with fire that will go to your head floating but players need to touch the brick first before it goes to their head, this script is onentered function.. i want is when a player got into the game its already on their head. probably onentered function? But i don't want to mess with the script.. cause last time i did it didn't work..

X = script.Parent
function onTouched(hit)
if hit.Parent:FindFirstChild("Humanoid")then
if hit.Parent:FindFirstChild("RedBrick")==nil then --Change this to the ingame name of the hat
I = Instance.new("Hat")
I.Parent = hit.Parent
I.AttachmentForward = Vector3.new(-0,-0,-1) --Change this to the AttachmentForward of the hat.
I.AttachmentPos = Vector3.new(0,-2,0.155) --Change this to the AttachmentPos of the hat.
I.AttachmentRight = Vector3.new(1,0,0) --Change this to the AttachmentRight of the hat.
I.AttachmentUp = Vector3.new(0,5,0) --Change this to the AttachmentUp of the that.
I.Name = "RedBrick" --Change this to the ingame name of the hat.
C = script.Parent:clone()
C.Parent = I
C.HatScript:Remove()
end end end
script.Parent.Touched:connect(onTouched)
0
THANKS IN ADVANCEDDDDDD V0ngola 0 — 9y

Closed as Not Constructive by User#2

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?