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

How to make these two scripts FilteringEnabled?

I need to know how to make these two scripts FilteringEnabled, but I am new to FilteringEnabled and i don't know how to do that.

Here's the scripts im using:

In a model (Regular Script):

part = script.Parent

function configure(player)
	if player.Team.Name == part.Parent.Parent.Name then
		player.PlayerGui.ScreenGui.EditObject.Object.Value = part
	end
end

part.ClickDetector.MouseClick:connect(configure)

in a TextLabel in a Descendent of ScreenGUI (LocalScript):

while true do
function updateText()
	if script.Parent.Parent.Object.Value then
		script.Parent.Text = script.Parent.Parent.Object.Value.Name
	end
end

wait()

updateText()
end

1 comment

0

Please do not duplicate your question, you can try edit your question post.

1 answer

That isn't possible, you'll have to place the value inside the player with a script as you cannot acces playergui using a serverscript, when you do that, don't forget you should only change values with serverscripts, not local ones (you can access values with both)

Also, add some :WaitForChild(''), it might break the code if you don't

2 comments

0

Even tho your method works, It is possible to access he playergui with the use of the FireCient() function.

0

Even with remote events it would be messy, the server should handle values.

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