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

cant get the changed event to work?

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...

10 comments

0

May I see the code in your LocalScript aswell?

0

it doesnt get a chance to even fire because the changed event doesnt work when its changed

0

Did you make a script that changes the Player?? or change a child of the Player...

0

I'm just chansing now but try to make more variables. One variable for "masterFolder", one for "CharacterData" and one for "Clown"

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.

0

Prints before the changed event then doesn't do anything after that

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?

0

What happens if you make a print inside the Event?

0

It wont fire because of the change event i even replaced the event with print("Hi") and nothing happen when the value changed

0

Then I still suggest expanding your variables as I said before

2 answers

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

6 comments

0

Didn't work

0

PrismaticFruits you should read up about GetPropertyChangedSignal

0

GetPorpertyChanged signal is

0

a function

0

And Nosh is trying to use the Changed event

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.

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)

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