Problem:
I made a script that checks If the Player has a certain value but, it doesn’t
seem to be printing.
Script:
local player = game.Players.LocalPlayer
if player.Quest1.Value == 4 then
print("Has The Value")
end
Problem:
I made a script that checks If the Player has a certain value but, it doesn’t
seem to be printing.
Script:
local player = game.Players.LocalPlayer
if player.Quest1.Value == 4 then
print("Has The Value")
end
Where is the Quest Value increasing from? Server or Client?
Its on the ServerSide
T h e r e ’ s y o u r a n s w e r
Values in Server & Client sides are different & separated from each other, they cannot replicate across both sides
Oh ya Im new to scripting so I still got a long way to go
Stuff changed on the server replicates to all clients
You sure? I mean I’m certain you’re right but replication across the 2 can be weird at times (Unless if I’m thinking about client/server manipulation)
It doesn’t look like it’s repeating, try doing:
player.Quest1.Value.Changed:Connect(function()
if player.Quest1.Value == 4 then
–Function Here
end
Hope it helps!
Ill try It Thanks for the help.
It might be:
player.Quest1.Changed:Connect(function()
if player.Quest1.Value.Changed doesn’t work.
Also if any of these work make sure to mark them as Solution!
The other one didnt so Ill try this
Yep Ofc I appreciate Your help
Sorry but this didnt work either.
Could you print what the Quest1 Value actually is to see what it Outputs as?
Or maybe add a:
while true do
–Lines of code here
wait()
end
I think a loop isn’t necessary the best option here, we just need to check once if the Value is equal to 4 or not I’m assuming
Yup because I tried a loop earlier
I agree but I don’t see the issue unless it updates on the client side, and runs on the server side for the code…
Everything is on the ServerSide