#Changing color of RopeConstraint?

4 messages · Page 1 of 1 (latest)

gloomy mist
#

What are some ways I can change the color of a ropeconstraint when a part is clicked? It doesnt seem to work like a normal part

nova auroraBOT
#

studio** You are now Level 4! **studio

gloomy mist
#
local part = script.Parent.RopeConstraint 

local startColor = Color3.fromRGB(143, 143, 143) 
local endColor = Color3.new(1, 0.282353, 0) 

local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(0.7, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local colorTween = tweenService:Create(part, tweenInfo, {Color = endColor})

part.Color = startColor

local function onClick(player)
    
    colorTween:Play()
end

script.Parent.ClickDetector.MouseClick:Connect(onClick)

#

Here is what I was trying