#GetPropertyChangedSignal doesnt work even tho property is changed

200 messages · Page 1 of 1 (latest)

primal kestrel
#

It looks like there are a few issues in your code. Let's go through them step by step:

In your code, you're trying to access game.Players.LocalPlayer.PlayerGui.smth.Text directly. However, the LocalPlayer object might not be available in a LocalScript. Instead, you should use game.Players.LocalPlayer.PlayerGui to access the GUI, and then find the Text object within it. Make sure the hierarchy is set up correctly.

You have a typo in your code: task.wait(2) should be wait(2).

You're trying to change value.value, but it seems like you meant to change interact.Value.

Here's a corrected version of your code:

**local interact = script.Parent.Parent.interact
local tween = game:GetService("TweenService")
local info = TweenInfo.new(0.5)
local player = game.Players.LocalPlayer
local textGui = player.PlayerGui:WaitForChild("smth")
local text = textGui.Text

local function typewrite(object, text)
for i = 1, #text, 1 do
object.Text = string.sub(text, 1, i)
game.ReplicatedStorage.Click:Play()
wait(0.05)
end
end

interact:GetPropertyChangedSignal("Value"):Connect(function()
if interact.Value == true then
print("works")
local target = {TextTransparency = 0}

    local tweeen = tween:Create(text, info, target)
    tweeen:Play()
    typewrite(text, script.Parent.Value)
    wait(2) -- Fix the typo here
    interact.Value = false -- Fix this line to change interact.Value
    local target = {TextTransparency = 1}
    local tweeen = tween:Create(text, info, target)
    tweeen:Play()
end

end) **
Make sure that the hierarchy and naming match your actual game setup, especially regarding the GUI elements. Also, ensure that the Click sound exists in ReplicatedStorage.

#

now tell me

#

if this works

#

just align it correctly and remove unecessary

#

it is separated by --

pallid mesaBOT
#

studio** You are now Level 2! **studio

primal kestrel
#

ye well i mean

#

its chat gpt

#

BUT

#

try to like separate the lines

past pewter
#

You can use Changed instead of GetPropertyChangedSignal
Here is an example related to your script:

interact.Changed:Connect(function()
  --rest of the script
end)
primal kestrel
#

ye fr

#

i was gonna say that

#

yeye

#

frfr

past pewter
#

Any errors?

#
local interact = script.Parent.Parent.interact
interact.Changed:Connect(function()
  print("hi")
end)
#

Try this

primal kestrel
#

blud cooked

past pewter
#

And see if is working

primal kestrel
#

and i took that idea

#

to cook

#

local interact = script.Parent.Parent.interact
interact.Changed:Connect(function()
print("hi")
end)

Try this

past pewter
primal kestrel
raw fern
#

any output errors?

past pewter
#

Wdym? It works or it doenst, there is no yes and no

raw fern
#

try adding more prints

past pewter
#

Where is the script? What kind of script?

raw fern
#

add the print before the if check to see if it captures the value change in the first place

past pewter
#

Is the script enabled? derp

raw fern
#

ah wait

#

@fickle glade

#

when you say

local text= game.Players.LocalPlayer.PlayerGui.smth.Text

you get the text variable as a string

#

you cannot change its properties anymore

past pewter
past pewter
#

A remote even for taht? oh god no

raw fern
#

you dont need a remotevent

#

just add more prints to see where the code stops

past pewter
#

Huge tip: Dont name instanced similary to properties

raw fern
#

narrow down the problem to a single line

#

and you can easily solve it

raw fern
past pewter
#

👆

raw fern
#

fucked me up once because I named a instance "Name"

past pewter
raw fern
#

add prints before the signal

raw fern
past pewter
#

Prints are the best thing ever existing, will help you fix every problem

sweet basin
#

any errors?

past pewter
#

LocalPlayer in server script....

raw fern
#

relatable

sweet basin
#

oops didn't scroll down

#

is this solved

raw fern
raw fern
past pewter
raw fern
#

WAIT

#

WAIT

#

WAIT

#

NO WAY

sweet basin
raw fern
#

SERVERSCRIPTSERVICE

past pewter
sweet basin
#

oh

#

You right

#

I missed that part, but you can access a player's gui..

raw fern
#

the local script the OP is having problems with was inside an instance named Interact

#

we didnt know it was in serverscriptservice

#

well I guess its solved

past pewter
raw fern
#

where is the script you are using located

raw fern
#

best question to ask beginners

#

and where is this lockDoor

past pewter
#

Workspace?....

raw fern
#

local scripts dont run in Workspace too

past pewter
raw fern
#

BRO

#

USE A SERVER SCRIPT

#

LOCAL SCRIPTS ARE FOR INTERACTING WITH CLIENTS

#

wait so

#

hold on

#

ah I see

#

what you wanted to do

#

you can do it 2 ways

past pewter
#

You could also use a local script to change stuff on workspace... but DONT USE IT IN WORKSPACE

#

Shitty loops?

raw fern
#
  • put this script into startergui
  • (other solution) make the script a serverscript and FireAllClients to change their UI
past pewter
raw fern
past pewter
#

Hold up, lemme check

#

Wait... He wants to change the text of a GUI instance but the script is a LOCAL SCRIPT in Workspace? wth...

raw fern
#

wait

#

I just realized

pallid mesaBOT
#

studio** You are now Level 3! **studio

raw fern
#

bro is using GetPropertyChangedSignal of a random ass value to do stuff in the client instead of a RemoteEvent

past pewter
#

You can't use a Local Script in Worksapce no matter whan you want to do lol

past pewter
raw fern
#

@fickle glade what are you trying to achieve can you explain it clearly please

#

oh

#

holon im eatin ice cream

past pewter
#

Didnt age well...

#

Parents room? hehe

raw fern
#

AVG just tell this guy to keep it all on the client

#

no need for remote

#

or a server script

past pewter
raw fern
#

you are def better than some i see people here

past pewter
#

If he want everyone to see, then just use a server script, else use a local script

raw fern
#

its a button that connects to a client-sided ui change from what i can tell

#

you learn somethin new everyday

#

alright so

#

smart

#

looks good just fire the remote with a clicked function on the door and it should work

past pewter
#

Why remote event? agony

#

You def have some shitty scripts

#

When used for absolutely nothing or for something you can just use a script, yes

#

Indeed, thats why your Roblox Studio is crashing

#

Maybe some scripts from ToolBox that are making your Roblox Studio crash?

raw fern
#

its good to have a remote event in most client stuff to be able to replicate stuff

#

you dont really need it in this situation

#

but whatever

past pewter
#

Using remote events for something like this is just a waste of computing power...

raw fern
#

some people fire a remote event every heartbeat

#

how else do you think they make stuff like dynamic torso

#

(that replicates to the server)

raw fern
past pewter
#

Server script? :)

raw fern
#

theres better methods

raw fern
#

every frame

past pewter
#

Dont know what you mean by "dynamic torso" tho

raw fern
#

basically your characters looks towards your mouse direction

past pewter
#

But yes, if you need something that is ONLY on client side and you need to replicate to server, then I 100% understand why you need a Remote Event

past pewter
raw fern
past pewter
#

Because as I know, when you are moving your character with WASD its on client but it automatically replicates to server without using a remote or smth

raw fern
#

@fickle glade you dont need a remote event

local model = your door
door.ClickDetector.MouseClick:Connect(function()
  local interact = model.interact
  local tween = game:GetService("TweenService")
  local info = TweenInfo.new(0.5)
  local player = game.Players.LocalPlayer
  local textGui = player.PlayerGui:WaitForChild("smth")
  local text = textGui.Text
  
  local function typewrite(object, text)
      for i = 1, #text, 1 do
          object.Text = string.sub(text, 1, i)
          game.ReplicatedStorage.Click:Play()
          wait(0.05)
      end
  end
  print("workss")
  
          local target = {TextTransparency = 0}
  
          local tweeen = tween:Create(text, info, target)
          tweeen:Play()
          typewrite(text, model.Text.Value)
          wait(2) -- Fix the typo here
          interact.Value = false -- Fix this line to change interact.Value
          local target = {TextTransparency = 1}
          local tweeen = tween:Create(text, info, target)
          tweeen:Play()
end)
#

what do you use

raw fern
# past pewter Wdym?

they change the CFrame of the motor6ds that connect the characters joints and make the character look towards your mouse direction

#

what is this for exactly

#

thanks but I figured it out anyways

#

this code seems to fire a server event when you click the door

#

are you firing the client again from a server script? because you cannot recieve .OnClientEvent from FireServer

#

is your game singleplayer

#

dont fire all clients, they will see the UI even if they are nowhere near there

#

fire the client of the player who clicked it

#

you should be able to get the player since FireServer passes down the player as the first variable

#

is the "kinda working " print working

sweet basin
#

this still not fixed?

pallid mesaBOT
#

studio** You are now Level 4! **studio

raw fern
#

is the script not working right now

#

Im jumping out of the window

#

bye

#

they

#

dont work in serverscriptservice

#

put it in starterplayerscripts

#

solution: player argument bust be a Player object

#

🤷

primal kestrel
#

nah but

#

it just started with a small thing

#

and now its a full paragraph of Mozart's 8903271Y78th symphony ?

#

wth

raw fern
primal kestrel
#

nah

raw fern
#

FireClient(Player,model)

primal kestrel
#

a basic error i think

#

well

#

i'm saying that just cause another one had it

#

like idk

#

why am i speaking that much fr

raw fern
#

uuuuuuuuuuugggggghhhhhhhhhh

#

brooooooooo

#

I think you can solve it from here

#

right?

#

send me the whole script

past pewter
#

You guys still here? :))

raw fern
#

this script

raw fern
past pewter
#

How the fuck?

raw fern
#

he didnt change the parent of the local script

#

it was still in serverscriptservice

past pewter
#

And it took this long to do it? lol

raw fern
#

how long has it been

#

I've lost track of time

#

an hour

#

its been an hour

#

send the script where you FireClient()

#

ah my bad

#

you already did the change I was gonna do

#

is the script working

#

I am disappointed at myself for not being able to solve something simple like this bruv

#

good luck