script i made simple that any simple scripts but it wont work for some reason please help
local fram = script.Parent.Parent.Parent.Parent.blockify.framblack1 script.parent.MouseButton1Click:Connect(function() wait(0.01) fram.BackgroundTransparency = 0.9 wait(0.01) fram.BackgroundTransparency = 0.8 wait(0.01) fram.BackgroundTransparency = 0.7 wait(0.01) fram.BackgroundTransparency = 0.6 wait(0.01) fram.BackgroundTransparency = 0.5 wait(0.01) fram.BackgroundTransparency = 0.4 wait(0.01) fram.BackgroundTransparency = 0.3 wait(0.01) fram.BackgroundTransparency = 0.2 wait(0.01) fram.BackgroundTransparency = 0.1 wait(0.01) fram.BackgroundTransparency = 0 wait(0.01) fram.BackgroundTransparency = 0.1 wait(0.01) fram.BackgroundTransparency = 0.2 wait(0.01) fram.BackgroundTransparency = 0.3 wait(0.01) fram.BackgroundTransparency = 0.4 wait(0.01) fram.BackgroundTransparency = 0.5 wait(0.01) fram.BackgroundTransparency = 0.6 wait(0.01) fram.BackgroundTransparency = 0.7 wait(0.01) fram.BackgroundTransparency = 0.8 wait(0.01) fram.BackgroundTransparency = 0.9 wait(0.01) fram.BackgroundTransparency = 1 end)
I recommend you use the TweenService service, way more clean and easy to do. (Also, you have "script.parent", pretty sure that doesn't work, as it's "script.Parent")
local fram = script.Parent.Parent.Parent.Parent.blockify.framblack1 local TweenService = game:GetService("TweenService") local tweenDictionary = {Transparency = 1} local newTween = TweenService:Create(fram, TweenInfo.new(3), tweenDictionary) script.Parent.MouseButton1Click:Connect(function() newTween:Play() end)