So I'm making a musket game that will consist of a GUI that will change class. (E.g. infantry, officer, rifles.) Below is a local script inside a screenGUI.
local ChangeFrame = script.Parent:WaitForChild("ChangeFrame")
local ChangeClassButton = script.Parent:WaitForChild("ChangeClassButton")
local OfficerEvent = game.ReplicatedStorage:WaitForChild("OfficerEvent")
local RiflesEvent = game.ReplicatedStorage:WaitForChild("RiflesEvent")
local Officer = script.Parent:WaitForChild("OfficerButton")
local Rifles = script.Parent:WaitForChild("RiflesButton")
--
ChangeClassButton.MouseButton1Click:Connect(function()
ChangeFrame:TweenPosition(UDim2.new(0.5, 0,0.5, 0))
end)
Officer.MouseButton1Click:Connect(function()
OfficerEvent:FireServer()
end)
Rifles.MouseButton1Click:Connect(function()
end)
Below is a normal server script stored inside ServerScriptService.
local player = game.Players
local character = game.Players.Character
game.ReplicatedStorage.OfficerEvent.OnServerEvent:Connect(function()
character:WaitForChild("Shirt").ShirtTemplate = "rbxassetid://1422626514"
character:WaitForChild("Pants").PantsTemplate = "rbxassetid://1070344465"
player.Character.Humanoid.Health = 0
end)
The whole purpose of these scripts is to make so when you click a TextButton for officer class, your character will die, and then get your shirt changed into the officer uniform. It doesn't work. Any help please?

5 comments
Well, I don't know if that works. But as you can see in the local script, my ChangeClass text button doesn't seem to work somehow. I clicked it, and the class frame doesn't appear.
OK, I tried replicating the situation. I copied your scripts, and the GUI appears for me. I'm kind of confused on your situation.
This video is about me experiencing the issue. It's easier to understand. https://www.youtube.com/watch?v=gVejnUsu_m8&feature=youtu.be
Alright, I got it working now. Thanks. :)
no problem, glad I helped!