Hello! I am currently making a cutscene for my game and in the cutscene, I want to replace the Player’s Shirt and Pants.
I thought it would be easy to program, however, for some reason in the cutscene the Player doesn’t have any clothes. The output doesn’t give me any errors.
The cutscene starts with a LocalScript firing a RemoteEvent. Then, a Server Script receives that and creates new clothing for the Player, fires the same RemoteEvent again, and then the cutscene plays on the client.
This is the Server Script that makes new clothing for the Player:
local DreamBarnCutsceneActivateRemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("DreamBarnCutsceneActivateEvent")
local TpPart = game.Workspace:WaitForChild("DreamCutsceneBarnCamParts"):WaitForChild("PlayerTpPart")
DreamBarnCutsceneActivateRemoteEvent.OnServerEvent:Connect(function(player)
local Shirt = Instance.new("Shirt")
local Pants = Instance.new("Pants")
Shirt.Parent = player.Character
Pants.Parent = player.Character
Shirt.Name = "Shirt"
Pants.Name = "Pants"
Shirt.ShirtTemplate = "rbxassetid://17175930056"
Pants.PantsTemplate = "rbxassetid://129459077"
player.Character:WaitForChild("HumanoidRootPart").CFrame = TpPart.CFrame
DreamBarnCutsceneActivateRemoteEvent:FireAllClients()
end)
Any help?