---error 11:44:47.790 - hm is not a valid member of PlayerGui 11:44:47.790 - Stack Begin 11:44:47.791 - Script 'Workspace.Clues.Knife.Part.Script', Line 13 11:44:47.791 - Stack End
So this what happend to me since I'm working on a Horror,Multiplayer game the script doesn't work since It's says hm is not valid member of PlayerGui. this is the script
---Actual script script.Parent.ClickDetector.MouseClick:Connect(function() script.Parent:Destroy() for i,v in pairs(game.Players:GetPlayers()) do local Clue = v.PlayerGui.hm.Clue for i=0, 100 do Clue.TextStrokeTransparency = Clue.TextStrokeTransparency - 0.01 Clue.TextTransparency = Clue.TextTransparency - 0.01 end wait(6) for i=0, 100 do Clue.TextStrokeTransparency = Clue.TextStrokeTransparency + 0.1 Clue.TextTransparency = Clue.TextTransparency + 0.1 end end end)
Can anyone explain what is going on?
You cannot access a player's gui via a server script unfortunely.. You have either to use a LocalScript inside the player or use remove events.
These will help you understand, they made everything clear for me. It's not complicated.
https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events
https://www.youtube.com/watch?v=wic-N4JiFss