Help me with this please when i play it in a game it wont work but in studio when i test it it work help ples
plrs = game:GetService("Players") Monsty = game:GetService("ServerStorage").Monsty Jebus = Monsty:Clone() Jebus.Name = "Christ" Stuff = Jebus:GetChildren() game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function() print("is this working?") local Player = game:GetService("Players").LocalPlayer Player.Character:ClearAllChildren() for i,v in pairs(Stuff) do local Holy = v Holy.Parent = Player.Character end Jebus:Destroy() game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = false end)
In this case it looks base is a function, but you're trying to index it like a table (eg. base[5]
or base.somefield
).
The 'upvalue' part is just telling you what kind of variable base
is, in this case an upvalue (aka external local variable)
I have a tricky history with remoteEvents and its siblings so this might not work.
--Script local monsty = game.ReplicatedStorage.Monsty --Place it in ReplicatedStorage so localscripts can access it local remote = game.ReplicatedStorage.RemoteEvent.OnServerEvent:connect(function(ply) local cha = ply.Character local jebus = monsty:Clone() cha:ClearAllChildren() for i,v in pairs(jebus:GetChildren()) do v.Parent = cha end jebus:Destroy() ply.PlayerGui:FindFirstChild("ScreenGui").Frame.Visible = true end)
I'm unsure if this will kill the player.