Change terrain decoration by LocalScript

This is a localscript in a TextButton, I want it to turn off/on the decoration of the Terrain, is it possible?

local Status = ("On")
local Button = script.Parent
local TextButton  = script.Parent.Parent.TextButton

function Clicked()

	if Status == ("On") then
		Status = ("Off")
		TextButton.Text = ("Desligado")
		TextButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
		game.Workspace.Terrain.Decoration = false

	elseif Status == ("Off") then
		Status = ("On")
		TextButton.Text = ("Ligado")
		TextButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
		game.Workspace.Terrain.Decoration = true

	end
end


Button.MouseButton1Click:connect(Clicked)

image

I don’t know if it’s possible to change it by a Local, it’s because I want to change only for the person who clicked

Not possible
https://developer.roblox.com/en-us/api-reference/property/Terrain/Decoration
It says not scriptable

(btw if this is solution can u mark it as solution)

6 Likes