pls help me again i added a click to transparency change my part but it not working whats weird about it its theres no error output it just wont work idk why this is frustrating pls heelp
part = game.Workspace.skate transparency = part.Transparency clickdetector = part.ClickDetector clickdetector.MouseClick:Connect(function() print("change transparency") if transparency >= 1 then transparency = 0 end transparency = transparency + .1 end) while true do part.CFrame = part.CFrame*CFrame.new(1,0,0) part.BrickColor = BrickColor.random() print("debug") end
Let's see what I can debug here in your script.
Here is the modified script:
part = game.Workspace.skate local clickdetector = part.ClickDetector clickdetector.MouseClick:Connect(function() print("change transparency") if part.Transparency >= 1 then part.Transparency = 0 end part.Transparency = part.Transparency + 0.1 end) while true do part.CFrame = part.CFrame*CFrame.new(Vector3.new(1,0,0)) part.BrickColor = BrickColor.Random() print("debug") wait() end
part = game.Workspace.skate transparency = part.Transparency clickdetector = part.ClickDetector clickdetector.MouseClick:Connect(function() print("change transparency") if transparency > 0.9 then transparency = 0 end transparency = transparency + 0.1 -- If your trying to make the part fade, add this inside the loop (while true do) end) spawn(function() -- This is to make sure the loop doesn't interrupt the MouseClick function while true do part.CFrame = part.CFrame*CFrame.new(1,0,0) part.BrickColor = BrickColor.random() wait() -- ALWAYS add a wait() to a loop or your script will crash print("debug") end end)
part = game.Workspace.skate clickdetector = part.ClickDetector clickdetector.MouseClick:Connect(function() print("change transparency") if part.Transparency >= 1 then part.Transparency = 0 end part.Transparency = part.Transparency + .1 end) while true do part.CFrame = part.CFrame*CFrame.new(1,0,0) part.BrickColor = BrickColor.random() print("debug") wait() end