Hello, I am trying to connect a function that typewrites a string based on when a item is visible or not. I am quite a bad scripter so sorry if this is a simple thing lol.
Here is the script:
local function typewrite(textlable,text)
for i = 1, #text do
textlable.Text = string.sub(text,1,i)
wait(.05)
end
end
if game.Workspace.Buttons.Dropper1Button.Transparency == 0 then typewrite(script.Parent.TextLabel, "This is a cool effect!")
if game.Workspace.Buttons.WallsButton.Transparency == 0 then typewrite(script.Parent.TextLabel, "If This Works it'd be even cooler!")
end
end
Also, I got most of this script from YouTube and Iām just trying to change parts of it to match my needs.
-- Example
workspace.Buttons.Dropper1Button.Changed:Connect(function(propName)
if propName == "Transparency" and workspace.Buttons.Dropper1Button.Transparency == 0 then -- check if the Transparency property was changed, and if its value is 0
typewrite(script.Parent.TextLabel, "This is a cool effect!")
end
end)
GetPropertyChangedSignal:
-- Example
workspace.Buttons.Dropper1Button:GetPropertyChangedSignal("Transparency"):Connect(function()
if workspace.Buttons.Dropper1Button.Transparency == 0 then -- check if the Transparency property is 0
typewrite(script.Parent.TextLabel, "This is a cool effect!")
end
end)