Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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!

1 comment

0

Sorry if this isn't allowed 0-0

1 answer

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

1 comment

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 :)

This discussion is preserved as it was. New answers, comments, and votes are closed.