i made 2 scripts connected to each other using RemoteEvent to give player a uniform if he answer with "Yes" (Dialog)
But.. its only working if i tested in-studio, and its not working in-game.
the First located in the NPC
local debounce = true
local UniEvent = game.ReplicatedStorage:WaitForChild("UniformGiveEvent")
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if choice == script.Parent.Yes then
if debounce then
debounce = false
UniEvent:FireServer()
end
end
end)
and the Second located in the ServerScriptService
local Event = Instance.new("RemoteEvent")
Event.Parent = game.ReplicatedStorage
Event.Name = "UniformGiveEvent"
local Shirt = "rbxassetid://000000000" -- Random code
local Pants = "rbxassetid://000000000" -- Random code
function GiveUni(plr)
local character = plr.Character
local shirt = character.Shirt
local pants = character.Pants
shirt.ShirtTemplate = Shirt
pants.PantsTemplate = Pants
end
Event.OnServerEvent:Connect(GiveUni)
Please Help Me!

3 comments
were there any errors in game on the devloper tab?
Why don't you just make the event yourself instead of having the script do it? Also are your scripts local or server?
I love using a Wok to cook with.