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

How would I make this text change with filtering enabled on?

Asked by 7 years ago

This works perfectly when filtering enabled is disabled. I cannot seem to figure out how to make it filtering compatible.

Namer = script.Parent.Configuration.Str_Name Color = script.Parent.Configuration.BC_BrickColor Anchor = script.Parent.Configuration.Bool_Anchored Collide = script.Parent.Configuration.Bool_CanCollide

function NameChange(newName) script.Parent.TextGUI.Text = newName end

function ColorChange(newColor) script.Parent.BrickColor = newColor end

function Anchoring(newAnchor) script.Parent.Anchored = newAnchor end

function Collision(newCollide) script.Parent.CanCollide = newCollide end

Namer.Changed:connect(NameChange) Color.Changed:connect(ColorChange) Anchor.Changed:connect(Anchoring) Collide.Changed:connect(Collision)

0
You should wrap the code in a code block (right-most button to the right of the bold/italics; it uses the Lua symbol) -- otherwise it is very difficult to read. chess123mate 5873 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

You need to read this guide: https://scriptinghelpers.org/guides/server-client-relationship-in-roblox

A possible reason your script isn't working is because you are trying to change the characteristics of parts (ex the BrickColor) from a client. Those changes should be visible to the local player, but they won't be replicated to other clients. As the guide explains, you need to use RemoteEvents and make the change on the server. The LocalScript should communicate through the RemoteEvent what the player wants changed and the server can then confirm that the player should be allowed to do that and then make the change.

Other reasons your script might not be working:

  • This is a Script but it is relying on parts to change that are changed only by a client
  • This is a LocalScript that needs to be a Script
  • This is a Script in a place that only LocalScripts run
Ad

Answer this question