Hmm the problem is with the local script as it returns nil according to a print(diffulty)
local RemoveEvent = game.ReplicatedStorage.TimeCompletedEvent
local player = game.Players.LocalPlayer
local TimeGui = player.PlayerGui:WaitForChild("TimeGui")
local debounce = false
local function onTouched(diffulty)
if debounce == false then
local EasyText = TimeGui:WaitForChild("EasyText")
local NormalText = TimeGui:WaitForChild("NormalText")
local MediumText = TimeGui:WaitForChild("MediumText")
local HardText = TimeGui:WaitForChild("HardText")
local diffulty
if EasyText.Visible == true then
diffulty = "Easy"
elseif NormalText.Visible == true then
diffulty = "Normal"
elseif MediumText.Visible == true then
diffulty = "Medium"
elseif HardText.Visible == true then
diffulty = "Hard"
end
local timetext = TimeGui:WaitForChild("TimeText")
local finishtime = timetext.Text
RemoveEvent:FireServer(diffulty, finishtime)
print(diffulty)
wait(2)
debounce = false
end
end
game.Workspace.Stop.Touched:Connect(onTouched)
game.Workspace.EasyStop.Touched:Connect(onTouched)
game.Workspace.MediumStop.Touched:Connect(onTouched)
game.Workspace.HardStop.Touched:Connect(onTouched)