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

How do I make this have effect other blocks??

So, I am trying to make it so when you click a block, I want it to effect another block that is in the game. How would I do this?

function onTouched()
	game.Workspace.StepBlock.White()
	script:Transparency (1)
	script:CanCollide = true()
	
	
end

script.Parent.Touched:Connect(onTouched)

So this is the basic of what I want to happen, I want to be able to touch the block, and it makes the other block appear and is able to be walked on. Anyone know how to do this?

1 answer

✓ Accepted answer
function onTouched()
    game.Workspace.StepBlock.White.Transparency = 1
    game.Workspace.StepBlock.White.CanCollide = true
end

script.Parent.Touched:Connect(onTouched) --function name is the single argument of `Connect`

7 comments

0

these admins are bullying me

0

The "White" in my script, Is the name of the block I want effected.

0

oh okay

0

The "StepBlock" is the name of the block that the "White" is inside of.

0

yes sir i got it

0

Not working? I think it is because it is not telling the system what block is to be stepped on. Any fix?

0

Wait nvm, I had the script in the wrong place. Thank you.

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