I’m trying to change a player’s WalkSpeed on the server base on a Frame visibility. And for some reason, when the frame was visible to me, the server printed its value is false. Can anybody help me?
Code block:
script.Parent.Touched:Connect(function(hit.Parent)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
showGui:FireClient(player)
wait(2)
print(player.PlayerGui.ScreenGui.Frame.Visible)
wait(20)
print(player.PlayerGui.ScreenGui.Frame.Visible)
end)
Essentially, all you need to do is make sure that the server is aware that your frame is visible by toggling that property on the server. When you choose to toggle it is your choice so long as it’s before you check the value on the server (like with the prints above).