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

How do I make this have effect other blocks??

Asked by 5 years ago

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

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your 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`
0
these admins are bullying me Gey4Jesus69 2705 — 5y
0
The "White" in my script, Is the name of the block I want effected. Yosufgamer -7 — 5y
0
oh okay Gey4Jesus69 2705 — 5y
0
The "StepBlock" is the name of the block that the "White" is inside of. Yosufgamer -7 — 5y
View all comments (3 more)
0
yes sir i got it Gey4Jesus69 2705 — 5y
0
Not working? I think it is because it is not telling the system what block is to be stepped on. Any fix? Yosufgamer -7 — 5y
0
Wait nvm, I had the script in the wrong place. Thank you. Yosufgamer -7 — 5y
Ad

Answer this question