Invalid member of players.... the code is below, its a token and once you step on it it's supposed to open a local GUI for you and then destroy the token but it's not working. (The destroy alone IS working but with the GUI it's not)
local Players = game:GetService('Players')
local Parent = script.Parent
---------------------------------------------------------
script.Parent.Touched:connect(function(Hit)
local Player = Players:GetPlayerFromCharacter(Hit.Parent)
if Player then
game.Players.Player.Name:FindFirstChild('PlayerGui').Token.Item_Recieved.Visible = false
script.Parent:Destroy()
end
end)
Note: This is NOT a local script, and the game is R6

3 comments
Well explained, upvoted.
@rhettsmith6537 , thanks for the advice, it has a error in output saying " Unable to cast value to Object" when i touch the token, pretty sure i set everything up correctly.
@rhettsmith6537 it also says the error is on the server sided touch script at line 4