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

cant get the changed event to work?

Asked by 4 years ago
game.Players.PlayerAdded:Connect(function(plr)
    local clown = plr:WaitForChild("masterFolder"):WaitForChild("CharacterData"):WaitForChild("Clown")
    clown.Changed:Connect(function()
        remote:FireClient(plr, "CClown")
    end)
end)

Just does nothing...

0
May I see the code in your LocalScript aswell? Spjureeedd 385 — 4y
0
it doesnt get a chance to even fire because the changed event doesnt work when its changed Nosh4309 8 — 4y
0
Did you make a script that changes the Player?? or change a child of the Player... NathanTheCraziest 105 — 4y
0
I'm just chansing now but try to make more variables. One variable for "masterFolder", one for "CharacterData" and one for "Clown" Spjureeedd 385 — 4y
View all comments (6 more)
0
I think you should do this print(clown) after you local clown and check it nil or not. It will help us easy to know the problem. Block_manvn 395 — 4y
0
Prints before the changed event then doesn't do anything after that Nosh4309 8 — 4y
0
How do you know it doesn't fire the Event? Maybe it does but there's something wrong in your LocalScript so it doesn't detect it? Spjureeedd 385 — 4y
0
What happens if you make a print inside the Event? Spjureeedd 385 — 4y
0
It wont fire because of the change event i even replaced the event with print("Hi") and nothing happen when the value changed Nosh4309 8 — 4y
0
Then I still suggest expanding your variables as I said before Spjureeedd 385 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
clown:GetPropertyChangedSignal:Connect(function()
    remote:FireClient(plr, "CClown")
end)

Just change it to that and it should work.

If this helped please accept this answer.

All the best,

PrismaticFruits

0
Didn't work Nosh4309 8 — 4y
0
PrismaticFruits you should read up about GetPropertyChangedSignal Spjureeedd 385 — 4y
0
GetPorpertyChanged signal is Luka_Gaming07 534 — 4y
0
a function Luka_Gaming07 534 — 4y
View all comments (2 more)
0
And Nosh is trying to use the Changed event Luka_Gaming07 534 — 4y
0
:GetPropertyChangedSignal() is a function that listen to the changing of specific property and fire Changed event when the property changed. But I think Nosh doesn't need it now. Block_manvn 395 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

I know PrismaticFruits already tried to answer with this and people in his comments correct him. But just so that you see it and understand I will explain it in full.

So GetPropertyChangedSignal(string PropertyName) is a function of Instance that listens to changes made to the specified property and returns an event that you can then connect to. Which in turn allows you to detect changes made to that property.

Example code:

clown:GetPropertyChangedSignal("Value"):Connect(function() -- Get event that listens to "Value" property changes, I am assuming that this is some form of value instance
    remote:FireClient(plr, "CClown")
end)

Answer this question