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

How to make these two scripts FilteringEnabled?

Asked by 6 years ago

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
0
Please do not duplicate your question, you can try edit your question post. NexoKami 12 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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

0
Even tho your method works, It is possible to access he playergui with the use of the FireCient() function. Le_Teapots 913 — 6y
0
Even with remote events it would be messy, the server should handle values. User#20388 0 — 6y
Ad

Answer this question