Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

1 comment

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.

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.