My first script detects a change in an int value's value. When the value becomes 0, it fires a remote event to the client. Server script:
script.Parent:GetPropertyChangedSignal("Value"):Connect(function()
print(script.Parent.Value)
local val = script.Parent.Value
if val == 0 then
print"is 0"
game.ReplicatedStorage.RemoteEvent:FireAllClients()
print("fired")
end
end)
The problem is, is that it doesn't fire the event. Here's my local script:
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function()
print("finally")
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character
script.Parent.Value = 10
char.Humanoid.WalkSpeed = 0
wait(.5)
char:MoveTo(Vector3.new(-20.55, 19.9, -6.46))
game.Workspace.Map1.Dots:Destroy()
local ss = game:GetService("ServerStorage")
local newdot = ss.Dots:Clone()
newdot.Parent = game.Workspace.Map1
wait(4.4)
char.Humanoid.WalkSpeed = 16
end)
I have no clue why this doesn't work.

1 comment
Add a print statement in global scope (i.e. at the top of the local script) and make sure it runs.