1 | ---error |
2 | 11 : 44 : 47.790 - hm is not a valid member of PlayerGui |
3 | 11 : 44 : 47.790 - Stack Begin |
4 | 11 : 44 : 47.791 - Script 'Workspace.Clues.Knife.Part.Script' , Line 13 |
5 | 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
01 | ---Actual script |
02 | script.Parent.ClickDetector.MouseClick:Connect( function () |
03 | script.Parent:Destroy() |
04 | for i,v in pairs (game.Players:GetPlayers()) do |
05 | local Clue = v.PlayerGui.hm.Clue |
06 | for i = 0 , 100 do |
07 | Clue.TextStrokeTransparency = Clue.TextStrokeTransparency - 0.01 |
08 | Clue.TextTransparency = Clue.TextTransparency - 0.01 |
09 | end |
10 | wait( 6 ) |
11 | for i = 0 , 100 do |
12 | Clue.TextStrokeTransparency = Clue.TextStrokeTransparency + 0.1 |
13 | Clue.TextTransparency = Clue.TextTransparency + 0.1 |
14 | end |
15 | end |
16 | 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