You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
So I am trying to achive that when the script detects that for example the cheese transparency = 0 then it changes the name of the tool to cheeseburger.
What is the issue? Include screenshots / videos if possible!
It doesn’t do that, and I get no errors or anything.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have gone on ROBLOX’s script pages and found nothing.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local tool = script.Parent
local cheese = script.Parent.Cheese
if cheese.Transparency == 0 then
tool.Name = "CheeseBurger"
end
Try While true do
local tool = script.Parent
local cheese = script.Parent.Cheese
if cheese.Transparency == 0 then
tool.Name = “CheeseBurger”
end
wait()
end
:GetPropertyChangedSignal() work just like .Changed event but instead of firing in every non-physics related property changes when used on a BasePart, it fires when the specified property parameter changes so it’s more efficient that a .Changed event. You can integrate it to your code like this:
local tool = script.Parent
local cheese = script.Parent.Cheese
cheese:GetPropertyChangedSignal(“Transparency”):Connect(function()
if cheese.Transparency == 0 then
tool.Name = "CheeseBurger"
end
end)