Howdy! I am trying to make a code where, when a player steps on a part, it fires a remote event, found in ReplicatedStorage. When fired, it should clone a gui, also found in rep storage, and paste it into the PlayerGui. However the below code doesn’t seem to be working and the gui never appears in the players gui.
part.Touched:Connect(function(plr)
if plr.Parent:FindFirstChild("Humanoid") then
local player = game.Players:FindFirstChild(plr.Parent.Name)
if player:FindFirstChild("Tag") then
print("Tag")
game.ReplicatedStorage:FindFirstChild("RemoteEvent"):FireClient(player)
else
print("No Tag")
end
end
end)
Any guidance would be most appreciated, as I am slowly getting back into coding.
I don’t really think there is a need to go into the hassle of using remote events.
After checking if it is a player just clone the GUI from replicated Storage to that player’s “PlayerGui”.