Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can you make a rope become visible using a script?

Asked by 4 years ago
Edited 4 years ago

I am trying to figure out how to make a rope appear after not being visible by a player typing a keyword in the chat.

I know for a part the transparency changes from 1 to 0 to make it appear but ropes don't have transparency.

This is what I have for a part:

game.Players.PlayerAdded:connect(function(player)

player.Chatted:connect(function(chat)

    if chat == "XII" then

        script.Parent.Transparency = 0

        script.Parent.CanCollide = true

    end

end)

end)

Do I have to change much so it can work for a rope?

1 answer

Log in to vote
0
Answered by 4 years ago

It's pretty simple just use the Ropes RopeConstraint.Visible Property

Example:

local Rope = game.Workspace.RopeFence.Rope

Rope.Visible = false -- <<Turns the rope invisible (Like transparency 1)
0
They wanted it to be visible not invisible, in which case it'd be a simple change from Rope.Visible = false to Rope.Visible = true. davidgingerich 603 — 4y
0
Just got it! Thank you! DrumMajorii 11 — 4y
Ad

Answer this question