Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

How do I make a block, when it is touched, affect another blocks properties?

Asked by 1 month ago

I am making a game where, in order to discover things, you must touch one thing first. The scripting tutorials have been no help as of late. I'm wondering if anyone on here will be able to help me out.

1 answer

Log in to vote
0
Answered by
Creacoz 62
1 month ago

this should work...

local otherpart = game:GetService("Workspace"):FindFirstChild(" NAME OF PART ")

script.Parent.Touched:connect(function(plr)
if plr.Parent.Humanoid then
otherpart.BrickColor = BrickColor.new("Really black")
end
end)
0
What is the 'otherpart.BrickColor'? I'm not sure if it's a placeholder or an actual kind of block type, Awesomegamer4231 7 — 1mo
0
look line 1 Creacoz 62 — 1mo
0
.BrickColor is just to change the color. You can change it to whatever. If you think I answered your question, can you accept my answer please :P? Creacoz 62 — 1mo
0
So... is otherpart the name of a part? Awesomegamer4231 7 — 1mo
View all comments (5 more)
0
Sorry, I'm just really dumb. Awesomegamer4231 7 — 1mo
0
Well its a local thing. If you want I can call you on discord to show you. Change the (" NAME OF PART ") at the end to the name of the part you want to change something on. Creaco #7709 Creacoz 62 — 1mo
0
For example, if the part's name was "woop", you would do : local otherpart = game:GetService("Workspace"):FindFirstChild("woop") Creacoz 62 — 1mo
0
Alright. Awesomegamer4231 7 — 1mo
0
It seems that I cannot friend you. FalloutCraftr#1056 Awesomegamer4231 7 — 1mo
Ad

Answer this question