I'm making a sword that has a ClickDetector in it and when it's being triggered I want to put the sword to the player's who clicked PlayerGui.ScreenGui. Since I got FilteringEnabled on the Output tells me that the server can't find ScreenGui in the PlayerGui. I tried scripting it different ways but I couldn't make it to work. Help, please.
The script that's in the sword.
script.Parent.ClickDetector.MouseClick:connect(function()
game.ReplicatedStorage.RemoteEvent:FireClient()
end)
This is the script that's in the ServerScriptService
game.ReplicatedStorage.Sword.OnServerEvent:connect(function(player)
game.Workspace.Sword.Parent=player.PlayerGui.ScreenGui
end)

2 comments
Why do you need to put the Sword into the ScreenGui?
I'm making a RPG. There will be an inventory.