How is the Roblox Snapchat game made?

Why don’t you just put the RemoteEvent in a PlayerAdded event? I think that the remote is firing AFTER the player is added (and the character).

So what id do it wrap the remote like this:

game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
RemoteEvent.OnServerEvent:Connect(function(plr)
-- blah blah blah
end)
end)
end)

or you could instead do this:

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(Player)
local Character = Player.Character
		local HumanoidDesc = game.Players:GetHumanoidDescriptionFromUserId(Player.UserId)
		local Humanoid = Character:FindFirstChildOfClass("Humanoid")
		Humanoid:ApplyDescription(HumanoidDesc)
	end)
end)
1 Like

It still doesn’t load my clothing. It’s not 3D, it’s classic, am I maybe using the wrong function?

I’m not sure really. Maybe make another thread and try to ask that specific question.

1 Like

I made a topic, but it didn’t get solved.

LocalScript:

local Gui = script.Parent
local ViewportCamera = Instance.new("Camera")
ViewportCamera.CFrame = Gui.Adornee.CFrame
ViewportCamera.FieldOfView = 80
Gui.ViewportFrame.CurrentCamera = ViewportCamera

print("yas")

local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent", 5)

local DetectZone = Gui.Adornee.Parent.DetectionZone
local Prompt = Gui.Adornee.Attachment.ProximityPrompt

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

local debounce = false

print("cat")

Prompt.Triggered:Connect(function()
	print("triggered")
	if debounce == true then return end
	debounce = true
	Prompt.Enabled = false
	Gui.ViewportFrame:ClearAllChildren()
	
	print("boblox")
	
	task.wait(1)
	local Parts = workspace:GetPartBoundsInBox(DetectZone.CFrame, DetectZone.Size)
	for _, part in Parts do
		local PartClone = part:Clone()
		PartClone.Parent = Gui.ViewportFrame
		print("part cloned")
		RemoteEvent:FireServer(Character)
		print("server fired")
	end
	Prompt.Enabled = true
	debounce = false
	print("yea yea")
end)

Server script:

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(Player, Character : Model)
	print("character")
	local Humanoid : Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
	print("yes")
	local HumanoidDesc = game.Players:GetHumanoidDescriptionFromUserId(Player.UserId)
	print("hi")
	Humanoid:ApplyDescriptionReset(HumanoidDesc)	
	print("desc applied!")
end)

Everything prints, so I couldn’t locate the problem.

1 Like