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

How do I make only 1 part allowed to activate the script?

Asked by
cboyce1 40
10 years ago
SoccerBall = game.Workspace.Part8

Workspace.Part6.CanCollide = false

function Touched(SoccerBall)
    Workspace.Part6.Decal1.Transparency = 0
    wait(3)
    Workspace.Part6.Decal1.Transparency = 1
    SoccerBall.Archivable = false
    SoccerBall.Position = Vector3.new(-198.29, 2.28, -111.29)
    wait(1)
    SoccerBall.Archivable = true
end

script.Parent.Touched:connect(Touched)

For example, I want SoccerBall to be the only one that activates the script. What do I need to add to the script? Thanks!

0
Sorry if this isn't allowed 0-0 cboyce1 40 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

All you need to do is put the script inside the SoccerBall. Only have 1 script, and make SoccerBall it's parent.

0
Ehh, but that would mean every time I touch the soccer ball, it gets activated, creating a goal... I need to keep it inside the current brick but only allow the SoccerBall to cause the goal when it touches this brick. Thanks anyway :) cboyce1 40 — 10y
Ad

Answer this question